WebDriver driver=new FirefoxDriver();
driver.get("https://www.google.co.in");
WebElement image= driver.findElement(By.id("hplogo"));
Boolean status=image.isDisplayed();
if(status==true){
System.out.println("Image is displayed");
}
else{
System.out.println("Image is not
displayed");
}
Output:true
0 comments:
Post a Comment