Testing React Js Dropdown With Selenium And Java
I have a drop down, that populates values dynamically using React JS. How can I select a value from this dropdown. Can you point me in the right direction maybe with an example. he
Solution 1:
I also had the same issue and found a solution based on Saurabh's answer.
WebElementbutton= driver.findElement(element);
Actionsaction=newActions(driver);
action.moveToElement(button).click().build().perform();
Solution 2:
Use action class. Here is an example:
Actionsact=newActions(this.getDriver());
act.moveToElement(element).click().build().perform();
act.click(elementValue).build().perform();
Post a Comment for "Testing React Js Dropdown With Selenium And Java"