WebDriver driver1 = new FirefoxDriver();
driver.navigate().to("http://www.tizag.com/htmlT/htmlselect.php");
WebElement dropdown = driver.findElement(By.xpath("/html/body/table[3]/tbody/tr/td[2]/table/tbody/tr/td/div[4]/select"));
Select value = new Select(dropdown);
List<WebElement> options = value.getOptions();
for(int i=0;i<options.size();i++)
{
String ValueToFind="Colorado -- CO";
String OptionValue;
OptionValue=options.get(i).getText();
if(OptionValue.contains(ValueToFind))
{
System.out.print("Option is present ");
}
}
I'm struck in upload image/list to my project using selenium. searched in number of site no luck.
ReplyDeleteplease advise me.
Hi Satish,
DeleteSelenium do support file upload ,but not sure which approach you took up for bulk upload so would suggest to share some details if you can.
hello priyanka,how to write test cases for selecting dropdown list in ruby using selenium
Delete