Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: How to select dropdown which doesnot have select tag using selenium webdriver?

Raj:

This is the following code and i couldn't use Select class to use visible text/index because it doesn't have any select tag. Here which i got confused is there is one coding for dropdown box and different coding for drodown values.

1) Dropdown box code which can click on it is

New

2) Dropdown values code is as below

Working

I have tried in so many ways including select class and individual xpaths

ex:


driver.findElement(By.xpath("//a[@class='select']")).sendKeys("Working");
driver.findElement(By.xpath("//a[@class='select']")).click();
driver.findElement(By.xpath("//div/ul/li[4]/a")).click();

Select dropdown = new Select(driver.findElement(By.xpath("//a[@class='select'][@aria-label='Lead Status']")));
dropdown.selectByVisibleText("Working");

Please help me how can i select list from dropdown without select class.



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: How to select dropdown which doesnot have select tag using selenium webdriver?

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×