In my code I have following line:
browser.find_by_css(business_role_expand).is_visible(1000)
According to the documentation, the code should wait maximum of 1000s for the element specified by the CSS to load and be visible. If not, it will return "False". However instead I get this error:
splinter.exceptions.ElementDoesNotExist: no elements could be found with css "div.panel:nth-child(4) > div:nth-child(1) > a:nth-child(1)"
Can anyone advise me? I don't understand why this happens. I'm using Firefox driver.
This error...
...implies that no element exists within the DOM Tree which can be identified by the css_selector:
As the element itself doesn't exist, there is no question of waiting for the presence, visibility or interactibility of the element even with
wait_timeSolution
Try to construct a locator strategy which identifies the element uniquely within the HTML DOM.