Friday 16 January 2015

How to verify whether the image is present or not on Selenium java cucubmer

How to verify whether the image is present or not on Selenium java cucubmer

if(driver.findElement(By.xpath("xpath of
image")).getAttribute("src").contains("image file name present in the html
source"));

it just verifies that the given image link present in the html source or
not. To verify that whether the image is displayed or not, you try to use
isDisplayed() command.

No comments:

Post a Comment