-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLocator_linktext.java
More file actions
29 lines (24 loc) · 920 Bytes
/
Locator_linktext.java
File metadata and controls
29 lines (24 loc) · 920 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package Locators;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import io.github.bonigarcia.wdm.WebDriverManager;
public class Locator_linktext {
public static void main(String[] args) throws InterruptedException {
WebDriverManager.chromedriver().setup();
WebDriver driver=new ChromeDriver();
driver.get("https://www.selenium.dev/");
Thread.sleep(10000);
driver.findElement(By.linkText("Downloads")).click();
Thread.sleep(10000);
driver.findElement(By.linkText("Documentation")).click();
Thread.sleep(10000);
driver.findElement(By.linkText("Projects")).click();
Thread.sleep(10000);
driver.findElement(By.linkText("Support")).click();
Thread.sleep(10000);
driver.findElement(By.linkText("Blog")).click();
Thread.sleep(10000);
System.out.println("Script success");
}
}