InterviewSolution
Saved Bookmarks
| 1. |
You have been asked to perform automation testing on a website that loads at a slow pace. You are able to execute the scenario manually without any impediments other than the speed issue. But while automation, NoSuchElementFound exception is thrown. |
|
Answer» Your test lead suggests making a change in the navigation commands. How will you handle this situation? From my observation of the test scripts, I find that the .navigateto() method has been used, which is not advisable in this case. Driver.get commands are perfect for a website that loads slowly, as it waits for the page to get loaded fully and then proceeds to the next steps. However, while using driver.navigateto() method, the driver does not wait for the page to be loaded completely, and many components are loaded yet, which throws the NoSuchElement exception. |
|