Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.84 KB | None | 0 0
  1. private static void test2() {
  2.         WebDriver webDriver = getDriverWithoutCookie("http://www.imt-atlantique.fr/fr");
  3.        
  4.         WebElement link =  webDriver.findElement(By.partialLinkText("Toutes les actualités".toUpperCase()));
  5.         link.click();
  6.        
  7.         webDriver.findElement(By.partialLinkText("Accueil"));
  8.        
  9.         System.out.println("link found");
  10.        
  11.         webDriver.quit();
  12.     }
  13.    
  14.     private static void test3(){
  15.         WebDriver webDriver = getDriverWithoutCookie("http://www.imt-atlantique.fr/fr");
  16.        
  17.         webDriver.findElement(
  18.             By.partialLinkText("Toutes les actualités".toUpperCase())
  19.         ).click();
  20.        
  21.         WebElement image = webDriver.findElement(By.xpath("//img[@alt='Accueil']"));
  22.         image.click();
  23.        
  24.         webDriver.findElement(By.partialLinkText("Toutes les actualités".toUpperCase()));
  25.        
  26.         System.out.println("Link found");
  27.        
  28.         webDriver.quit();
  29.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement