Quality Testing

Quality is delighting customers

Hi

How to select value from drop down list ? 

for example in yahoo registration page in gender drop down list how to we identify label male.

using recording i am getting like this

select  gender label=male

 

Thanks in Advance....

 

Thanks and Regards

Narendra.G

Views: 354

Reply to This

Replies to This Discussion

if i want to only one value from list then hav to write (select "#1")

 

Tnx for replay if i want to select 2 r 3 ..n then wat i have to do

select extend "#n"

 

good answer anjesh  

Not able to get the value

 List <WebElement> dropdownobject = driver.findElements(By.xpath("//*[@id='selProjectSelection']"));
        for (WebElement options : dropdownobject ) {
         System.out.println(options.getText());
         if ("optionname".equalsIgnoreCase(dropdownobject .get(arg0).getText())){
             dropdownobject .click();
          break;

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2022   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service