Skip to main content


Showing posts from December, 2011

Script Error while running selenium scripts on IE

While running the selenium scripts on IE, we might get this error sometimes:


Possible that your pop-up blocker is enabled which is stopping selenium from opening another window (multi-window mode) - so add an exception to your pop-up blocker - Use this link to add/remove popup exceptionsYou can disable script errors on IE by disabling MDM. Machine Debug Manager Windows service (not only stop it, but prevent it from starting after the computer restarts). Follow this link to DisableSometimes running the tests/starting the server as an ADMIN resolves the issue

Selenium: How to verify a hidden div tag exists

Most of the times we do have hidden div tags which need to be verified. 
In most of the test designs, the first step towards testing a particular application is to verify that all the elements exist on the application under test. 

Lets say we have a login page which has two text-fields. One for username the other for password. On the page, we also have a hidden div tag which is used by the developer to pass on the login failure message. 
Usually its hidden but is set to visible when there is a login failure. 

In usual test designs we would want to do something like this at the first step. 
1. test all the components exist: 
verifyTrue(selenium.isElementExists(LoginPage.username)); verifyTrue(selenium.isElementExists(LoginPage.password));

2. Then give an incorrect username and password 

3. Now verify that the label for the failure message exists