Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. package testauto;
  2.  
  3. import org.openqa.selenium.By;
  4. import org.openqa.selenium.WebDriver;
  5. import org.openqa.selenium.firefox.FirefoxDriver;
  6. import org.testng.annotations.Test;
  7.  
  8. public class calc {
  9.  
  10. @Test
  11. public void testLinkUno() throws Exception {
  12. WebDriver driver = new FirefoxDriver ();
  13. driver.get("http://www.calculator.net/");
  14. driver.findElement(By.linkText("Financial Calculators")).click();
  15. driver.quit();
  16. }
  17. @Test
  18. public void testLinkDos() throws Exception {
  19. WebDriver driver = new FirefoxDriver ();
  20. driver.get("http://www.calculator.net/");
  21. driver.findElement(By.linkText("Fitness & Health Calculators")).click();
  22. driver.quit();
  23. }
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement