Element Not Found although element is there.
OS:
Windows 8.1, Windows 2008 R2
Selenium Version:
2.53.2
Browser:
Google Chrome
Browser Version:
51.0.2704.103
Expected Behavior -
I have a dialog when it closing new element is created in the list then I am doing search for a new created element by xpath //div[text()='New Element Text'] In sometimes it gives me an error that element is not there but it is there. I have used different methods to select the element, by the wait, by the implicit wait, by changeToDefaultContent, by refreshing the page driver can't find the element but I see that element is there. If I execute the tests 5 times minimum once the test is failing.
Actual Behavior -
In some times element is there but webdriver sais that element does not found.
Steps to reproduce -
Open Dialog -> Insert Data to the Fields -> Click the Create Button -> Wait until button element will be removed from the dom tree -> check in the list new element is Created or not.
unsubscribe
Difficult to say what is the problem.Maybe JavaScript does something in background and element is inactive when you try to find it.
Please provide a completely reproducible test case for us that would include a link to a page or html (including css / javascript) along with a WebDriver script to reproduce the issue. Without this there is little to nothing one can do to help with your issue. Please do not expect others volunteering their time to work at reproducing your issue.
When a reproducible test case is provided we can reopen the issue.