Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
232 views
by The go-to Tester (473 points)
retagged by
We need to write result after verfying some element on webpage. So how to use verify statement in webdriver?
by The go-to Tester (181 points)
what test automation framework do you use? TestNG or JUnit?
by The go-to Tester (473 points)
I am using TestNG framework

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)

You can try using code as given below.

 

Verifying the footer link:

if(isElementPresent(By.linkText("some footer link"))){
System.out.println("the Link found");
}
else{
System.out.println("the Link not found");
}
 
Hope that helps!
by The go-to Tester (181 points)
Let me know if that works for you.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...