mercredi 30 mai 2018

Same id for 2 dropdown unable to perform actions om 2 one

Hi everyone In my code there are 2 dropdowns on 2 different pages and they both have same id "birth-nation". I am able to perform the actions by using this id but when it goes to second it gives me an error that element is not visible.

Here is code:

Select dropdown1111111 = new Select(driver.findElement(By.id("birth-nation"))); dropdown1111111.selectByVisibleText("UNITED STATES");

Select dropdown1111111 = new Select(driver.findElement(By.id("birth-nation"))); dropdown1111111.selectByVisibleText("UNITED STATES");

the id for both are same and i am not able to perform actions on 2 dropdown.

Please help.

Aucun commentaire:

Enregistrer un commentaire