-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLinkdinApp.java
More file actions
39 lines (28 loc) · 1.24 KB
/
LinkdinApp.java
File metadata and controls
39 lines (28 loc) · 1.24 KB
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
30
31
32
33
34
35
36
37
38
39
package AutomationTesting;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import io.github.bonigarcia.wdm.WebDriverManager;
public class LinkdinApp {
public static void main(String[] args) throws Exception {
// Set up ChromeDriver
WebDriverManager.chromedriver().setup();
// Create a new instance of ChromeDriver
WebDriver driver = new ChromeDriver();
// Maximize the browser window
driver.manage().window().maximize();
// Navigate to LinkedIn
driver.get("https://www.linkedin.com/feed/");
Thread.sleep(3000);
driver.findElement(By.id("email-or-phone")).sendKeys("koreomkar@gmail.com",Keys.TAB);
driver.findElement(By.id("password")).sendKeys("Password@9999");
driver.findElement(By.className("join-form__show-password-btn")).click();
driver.findElement(By.id("join-form-submit")).click();
Thread.sleep(5000);
//driver.findElement(By.className("main__sign-in-link")).click();
Thread.sleep(3000);
// Close the browser
driver.quit();
}
}