forked from lerndevops/labs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AddNewContact.java
26 lines (20 loc) · 1 KB
/
AddNewContact.java
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
package com.selenium.testing;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class AddNewContact {
public static void main(String[] args) {
System.setProperty("webdriver.chrome.driver","C:\\Users\\Nareshwar\\Downloads\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
driver.get("http://192.168.198.141:32768/addressbook/");
driver.findElement(By.xpath("//div[@class = 'v-button v-widget']")).click();
driver.findElement(By.id("gwt-uid-5")).sendKeys("Rostow1");
driver.findElement(By.id("gwt-uid-7")).sendKeys("G");
driver.findElement(By.id("gwt-uid-9")).sendKeys("805983095");
driver.findElement(By.id("gwt-uid-11")).sendKeys("[email protected]");
driver.findElement(By.xpath("//div[@class = 'v-button v-widget primary v-button-primary']")).click();
driver.close();
}
}