-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathselenium_assignment1.java
33 lines (22 loc) · 1.27 KB
/
selenium_assignment1.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
27
28
29
30
31
32
33
package learningselenium;
import org.openqa.selenium.By;
import org.openqa.selenium.chrome.ChromeDriver;
public class selenium_assignment1 {
public static void main(String[] args) {
ChromeDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get("http://leaftaps.com/opentaps/control/main");
driver.findElement(By.id("username")).sendKeys("DemoCsr");
driver.findElement(By.id("password")).sendKeys("crmsfa");
driver.findElement(By.className("decorativeSubmit")).click();
driver.findElement(By.linkText("CRM/SFA")).click();
driver.findElement(By.linkText("Leads")).click();
driver.findElement(By.linkText("Create Lead")).click();
driver.findElement(By.id("createLeadForm_companyName")).sendKeys("TestAssignment1");
driver.findElement(By.id("createLeadForm_firstName")).sendKeys("TestFirstName");
driver.findElement(By.id("createLeadForm_lastName")).sendKeys("TestLastName");
driver.findElement(By.id("createLeadForm_primaryEmail")).sendKeys("[email protected]");
driver.findElement(By.id("createLeadForm_primaryPhoneNumber")).sendKeys("9865986598");
driver.findElement(By.className("smallSubmit")).click();
}
}