-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssignment135_.java
More file actions
55 lines (31 loc) · 1.46 KB
/
Assignment135_.java
File metadata and controls
55 lines (31 loc) · 1.46 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package BasicsSelenium;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
//WAP to automate the username, hint, password, your first name, boy,girl,baby, male&female relocate & click to know fields
public class Assignment135_ {
public static void main(String[] args) {
ChromeDriver driver = new ChromeDriver();
driver.get("file:///C:/Users/USER/OneDrive/Desktop/learningHTML1.html");
driver.manage().window().maximize();
WebElement UName = driver.findElement(By.xpath("(html/body/input)[1]"));
UName.sendKeys("Abhilash Pasikanti");
WebElement Hint = driver.findElement(By.xpath("(/html/body/input)[2]"));
Hint.sendKeys("A");
WebElement Password = driver.findElement(By.xpath("(/html/body/input)[3]"));
Password.sendKeys("Abhi@1234");
WebElement FName = driver.findElement(By.xpath("(//form/input)[1]"));
FName.sendKeys("Abhilash");
WebElement Bbutton = driver.findElement(By.xpath("((/html/body/form)[2]/input)[1]"));
Bbutton.click();
WebElement Gbutton = driver.findElement(By.xpath("((/html/body/form)[2]/input)[2]"));
Gbutton.click();
WebElement B1button = driver.findElement(By.xpath("((/html/body/form)[2]/input)[3]"));
B1button.click();
WebElement Fbutton = driver.findElement(By.xpath("(//form/input)/[6]"));
Fbutton.click();
WebElement Mbutton = driver.findElement(By.linkText("(/html/body/input)[4]"));
Mbutton.click();
// driver.quit();
}
}