Archive

testing

In the original version of Selenium, you started the selenium server and used it to check if an element is present by calling its isElementPresent( ) method. An example:

assertTrue(selenium.isElementPresent(“pageBanner”));

In Selenium 2, you call the WebElement method isDisplayed( ) on the element itself, found using the web driver. An example:

WebElement banner = driver.findElement(By.id(“pageBanner”));

assertTrue(banner.isDisplayed( ));

Advertisements