-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssignment137_.java
More file actions
55 lines (34 loc) · 1.62 KB
/
Assignment137_.java
File metadata and controls
55 lines (34 loc) · 1.62 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;
public class Assignment137_ {
public static void main(String[] args) {
ChromeDriver driver = new ChromeDriver();
driver.get("https://grotechminds.com/registration/");
driver.manage().window().maximize();
//class="lname form-control "
WebElement FName = driver.findElement(By.xpath("//input[@id='fname']"));
FName.sendKeys("Pasikanti");
WebElement LName = driver.findElement(By.xpath("//input[@id='lname']"));
LName.sendKeys("Abhilash");
//id="Present-Address"
WebElement EName = driver.findElement(By.xpath("//input[@id='email']"));
EName.sendKeys("newuser@gmail.com");
WebElement PName = driver.findElement(By.xpath("//input[@id='password']"));
PName.sendKeys("Password!");
WebElement RButton = driver.findElement(By.xpath("//input[@id='male']"));
RButton.click();
WebElement PAddress = driver.findElement(By.xpath("//textarea[@id='Present-Address']"));
PAddress.sendKeys("Hyderabad");
WebElement PAAddress = driver.findElement(By.xpath("//textarea[@id='Permanent-Address']"));
PAAddress.sendKeys("Hyderabad"); //name="Submit"
WebElement PCode = driver.findElement(By.xpath("//input[@id='Pincode']"));
PCode.sendKeys("xxxxx");
WebElement Cbox = driver.findElement(By.xpath("//input[@id='relocate']"));
Cbox.click();
WebElement SBuuton = driver.findElement(By.xpath("//Button[@name='Submit']"));
SBuuton.click();
driver.quit();
}
}