Posts

Showing posts from April, 2016

Running Selenium tests on Internet Explorer Browser

The main advantage of Selenium testing is the cross browser testing. So test once written for a browser, can be run on other supported browser as well (off course with little changes :-) ). Let's see how we can run selenium java test on Internet Explorer browser. For this we need - IEDriverServer.exe (it can be downloaded from here ): This is Internet Explorer driver server which is needed by Selenium to execute tests on Internet Explorer browser. We should first follow these steps to make sure that IE is setup correctly so that it can be handled by Selenium properly.  In our script, we will be explicitly mentioning which IEDriverServer.exe to use to run tests. Below is a simple test we can run to understand what it takes to run a test on Internet Explorer. Basic steps for creating script: Create a TestNG class in eclipse While creating TestNG class, select these annotations - @BeforeMethod, @AfterMethod Code for the script would as given below – Click on code to u

Simple Data Driven Framework script

Image
Why use Data driven Framework? We go for data driven framework, to test application behavior for different sets of data. So in this, script remains the same only the data on which the script will work changes as manual testing scenarios. One basic example would be to test login functionality. Typical test case for login functionality have the test cases wherein only data changes are present and basic steps remain the same.  Example basic login test cases: Verify that for valid credentials, user is granted access to system. Verify that for invalid credentials, user is denied access to system. Verify that after successful login user is presented with correct landing page. Basic steps in all above test cases would as given below: Navigate to Application Under Test URL Enter user name Enter password Click on Login/Submit button Verify result When above scenario is to be automated then the best solution is to implement it using Data Driven Framework. Simp