Skip to content

Strange interaction between Shadow and FluentWait #43

Answered by sukgu
zamioku asked this question in Q&A
Discussion options

You must be logged in to vote

For shadow objects Selenium wait won't work. For Shadow objects you can use void setExplicitWait(int seconds, int pollingTime) throws Exception. This has wait time in seconds as 1st arg and pollingTime as 2nd args.

To use this you need to set first explicit wait using setExplicitWait method and then try finding the element using shadow.findElement method

Shadow shadow = new Shadow(driver);
shadow.setExplicitWait(10, 2);
WebElement element = shadow.findElement("div@user");
//now you can reset the wait to 0
shadow.setExplicitWait(0, 0);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zamioku
Comment options

Answer selected by zamioku
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants