Posts

Showing posts from October, 2014

Selenium Webdriver in Nodejs + Javascript

Phewww getting back to blog after almost an year. So, am back to discuss an interesting node module selenium-webdriver [Ref: Project Doc and npm registry ] Am assuming the reader has prior knowledge on what nodejs , npm and node modules are. And a little bit of selenium fun ;) What is selenium? As wiki says, Selenium is a portable software testing framework for web applications. It is a prominently used tool for browser automation. For further details checkout SeleniumHQ . What are we doing here? Basically Selenium provides bindings in many languages like java, python, php and now even nodejs. Here am planning to run through few code samples of using selenium webdriver in nodejs. Where to start? im@mylaptop$ npm install --save selenium-webdriver A Simple Webdriver Example // Import Selenium Dependency var Webdriver = require('selenium-webdriver'); // Few Settings var PAGE_LOAD_TIMEOUT_MS = 10000; var SCRIPT_LOAD_TIMEOUT_MS = 1000; var WINDOW_WIDTH_PX = 1024; v