Exemplo n.º 1
0
 private void chooseSkillTrade(IWebElement element, string trade, string skillExc, string credit)
 {
     if (trade == "Skill-Exchange")
     {
         element.FindElement(By.XPath("//div[@class='ui radio checkbox']/input[@value = 'true' and @name='skillTrades']")).Click();
         if (SkillExchange.Displayed && SkillExchange.Enabled)
         {
             SkillExchange.EnterText(skillExc);
             SkillExchange.EnterText(Keys.Enter);
         }
         else
         {
             Console.WriteLine("Skill Exchange textbox is not avaiable");
             return;
         }
     }
     else if (trade == "Credit")
     {
         IWebElement Credit = element.FindElement(By.XPath("//div[@class='ui radio checkbox']/input[@value = 'false' and @name = 'skillTrades']"));
         Credit.Click();
         GlobalDefinitions.wait(5);
         if (CreditAmount.Displayed && CreditAmount.Enabled)
         {
             CreditAmount.EnterText(credit);
         }
         else
         {
             Console.WriteLine("Credit textbox is not avaiable");
             return;
         }
     }
 }