//Clicks on dropdwon ..........[Because all option tags are hidden.]
wb.findElement(By.xpath("//*[@class='body
front']/div[2]/div/label/div")).click();
// Weblist
WebElement dropdown=wb.findElement(By.xpath("//*[@class='body
front']/div[2]/div/label/select"));
Select selectdropdown=new Select(dropdown);
List<WebElement> all=selectdropdown.getOptions();
System.out.println("Elem are:"+all.size());
for(int i=1;i<all.size();i++)
{
System.out.println("Ele are : "+all.get(i).getText());
}
i want to printy all the option present in dropdown...
---------------------------------------------------------------------------
My Html code..
<div class=...>
<div class=...
<label>
<div id="aa">
<select class="bb">------->[This tag is hidden]
<option value="cc">A</option>
<option value="dd">B</option>
</select>
</label>
</div>
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/bc446bc9-f696-49fc-bda0-6246fe88703a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.