How to reload html DOM using selenium so that new commands find new nodes?

So, I do several tests on one page, which changes its html tree after clicking certain buttons and links. but webdriver only continues searching through the old html DOM.

So how can I target recently added web elements? or how can I get webdriver to load a new Html DOM so that it targets new elements? thanks

+5
source share
1 answer

WebDriver automatically polls the DOM.

Just use an implicit or explicit wait before interacting with recently added web elements: http://www.seleniumhq.org/docs/04_webdriver_advanced.jsp#explicit-and-implicit-waits

+3
source

Source: https://habr.com/ru/post/1238015/


All Articles