-
Notifications
You must be signed in to change notification settings - Fork 0
/
twitter_register
27 lines (17 loc) · 986 Bytes
/
twitter_register
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
System.out.println("Start registration of $prename $surname on Twitter");
driver.get("http://www.twitter.com/");
WebElement element = driver.findElement(By.name("user[name]"));
element.sendKeys("$prename $surname");
element = driver.findElement(By.name("user[email]"));
element.sendKeys("$email");
element = driver.findElement(By.name("user[user_password]"));
element.sendKeys("$password");
System.out.println("please check the data and submit the data");
scanner.nextLine();
element = driver.findElement(By.xpath("//input[@value='Sign up']"));
element.click();
System.out.println("please check the data and submit the data");
scanner.nextLine();
element = driver.findElement(By.xpath("//input[@value='Create my account']"));
element.click();
System.out.println("$prename $surname was registered on Twitter.com");