Selenium + Node
Introduction to Selenium Webdriver Introduction to Node.js Installation and Environment set up NPM – Package Manage for Node.js Directory layout of Selenium Webdriver Node.js package Chrome Chrome with options Chrome in Mobile Emulation IE Firefox Element identification methodsAssertions in Selenium in Node.js Interacting with elements in Selenium in Node.js Basic Browser window automation Sending keys in Selenium in Node.js Synchronization in Selenium Check if Element exists Working with Tables using Selenium Performing advanced actions using Selenium in Node.js Executing JavaScript in Selenium in Node.js Working with multiple Browser Windows or tabs Working with multiple frames Handling alerts Common exceptions in Selenium Taking a screenshot in selenium Mocha – Unit testing framework Selenium gridExceptions 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!!