-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRegistrationTest.java
83 lines (44 loc) · 1.51 KB
/
RegistrationTest.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.annotations.Test;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
public class RegistrationTest {
static WebDriver driver = null;
@BeforeTest
public void setUpTest()
{
String projectPath = System.getProperty("user.dir");
System.out.println("projectPath : "+projectPath);
System.setProperty("webdriver.chrome.driver",projectPath+"/driver/chromedriver.exe");
driver = new ChromeDriver();
}
@Test
public void RegistrationProcess() throws InterruptedException {
driver.get("https://www.lookoidbd.com/my-account/");
Thread.sleep(2000);
driver.manage().window().maximize();
//Registration Process Starts
//Input Username
driver.findElement(By.id("reg_username")).sendKeys("testuser128");
Thread.sleep(1000);
//Input Email
driver.findElement(By.id("reg_email")).sendKeys("[email protected]");
Thread.sleep(1000);
//Input Password
driver.findElement(By.id("reg_password")).sendKeys("testuser1@aiub");
Thread.sleep(1000);
//Register Button Click
driver.findElement(By.xpath("//button[@name='register']")).click();
Thread.sleep(1000);
// LOg
driver.findElement(By.xpath("//*[@id=\"post-13\"]/div/nav/ul/li[7]/a")).click();
Thread.sleep(3000);
}
@AfterTest
public void tearDownTest() {
driver.close();
driver.quit();
}
}