Archive for the ‘selenium RC’ Category

Assert for elementNotPresent on a page in Selenium WebDriver

There would be some scenarios where we need to assert that a particular emenet is not present or element is hidden on a page.

we need to do the following to assertElementNotPresent:
Create a class by Name: public class Element

Inside the class Element.java add the following method by name isHidden()
public static Boolean isHidden( WebDriver webDriver, By by )

{

try

{

WebElement element = webDriver.findElement( by );

return false;

}

catch ( NoSuchElementException e )

{

return true;

}

}

what the above does is it gets the Element not found exception and returns true.
How to implement the above class and method:

In the actual test add the following:

assertTrue( Element.isHidden( getWebDriver(),   By.xpath( xpathLocator ) ) );

Selenium 2 – Grid release

Selenium 2 Grid release is now available.

Check out the official post here

Also Learn how to setup Grid from the following Instructions.

Now Automation life becomes much more easy for all Selenium users

Selenium WebDriver – New API

Selenium WebDriver – New API more details coming soon

Return top

INFORMATION

Do not forget to leave a comment if you find the posts useful.
 
38059