Exceptions in Selenium in node

You may encounter below types of exceptions and errors when working with Selenium in Node.js
  • Element is not clickable at point ….This exception comes when Selenium is not able to click on the element as it is hidden or wrapped in other html tag. To fix this issue, you need to use native JavaScript click method.
  • No Such Element…..This exception comes when element is not found in the web page matching given locator. To prevent this exception, make sure that you have given correct xpath, css selector. Also make sure that element actually exists on the page.
  • The path to the driver executable must be set by the webdriver.chrome.driver system property……..This error comes when driver exe file is not found in the system Path or in JVM argument. To fix this issue, you need to make sure that exe file is present in system path.
  • Stale Element Exception – This exception comes when you try to access the element which is loaded afresh in the page. To fix this issue, you need to call findElement method to get the reference to fresh element.
  • IE issues – When trying to launch the IE browser, you may encounter error saying protected mode settings are not same for all security zones. To prevent this issue, you need to make sure that protected mode settings are same for all zones in IE.

Web development and Automation testing

solutions delivered!!