Skip to main content
5 of 5
Too complicated title for simple question. Added tags
Kate Paulk
  • 31.5k
  • 8
  • 55
  • 109

Selenium: Incorrect drop down option selected

While passing a value, system selects a different value from the drop down in selenium web driver.

Following is the code written:-

driver.findElement(By.xpath(".//*[@id='ctl00_ContentPlaceHolder1_Users_RadGrid_ctl00_ctl02_ctl03_RCNewJobType_Input']")).click();

driver.findElement(By.xpath(".//*[@id='ctl00_ContentPlaceHolder1_Users_RadGrid_ctl00_ctl02_ctl03_RCNewJobType_Input']")).sendKeys(mystring[5]);

driver.findElement(By.xpath(".//*[@id='ctl00_ContentPlaceHolder1_Users_RadGrid_ctl00_ctl02_ctl03_RCNewJobType_Input']")).sendKeys(Keys.ARROW_DOWN,Keys.ENTER);