forked from naveenanimation20/src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdUploadWeb.java
48 lines (28 loc) · 2.34 KB
/
AdUploadWeb.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
import org.openqa.selenium.By;
import org.openqa.selenium.firefox.FirefoxDriver;
public class AdUploadWeb {
public static void main(String[] args) throws InterruptedException {
FirefoxDriver driver = new FirefoxDriver();
driver.get("http://millionads.org/dc/agentpost.php");
Thread.sleep(5000L);
driver.findElement(By.xpath("//*[@id='email']")).sendKeys("[email protected]");
driver.findElement(By.xpath("//*[@id='website']")).sendKeys("http://www.google.com");
driver.findElement(By.xpath("//*[@id='cat']")).sendKeys("Books & Publications");
driver.findElement(By.xpath("//*[@id='title']")).sendKeys("Title for Books and publications");
driver.findElement(By.xpath("//*[@id='description']")).sendKeys("Our products include furniture inspired by the Classics, including designers like Florence Knoll, Eero Saarinen, Arne Jacobsen, Charles Eames, Mies van der Rohe & many more. The product we offer is not competing with the lower priced imitations, we believe that our furniture should be suitable for use and last for");
driver.findElement(By.xpath("//*[@id='affcode']")).sendKeys("[email protected]");
driver.findElement(By.xpath("html/body/div[2]/div/div[2]/span[2]/table/tbody/tr[9]/td[2]/input")).click();
//driver.quit();
driver = new FirefoxDriver();
driver.get("http://millionads.org/dc/agentpost.php");
Thread.sleep(5000L);
driver.findElement(By.xpath("//*[@id='email']")).sendKeys("[email protected]");
driver.findElement(By.xpath("//*[@id='website']")).sendKeys("http://www.google.com");
driver.findElement(By.xpath("//*[@id='cat']")).sendKeys("Books & Publications");
driver.findElement(By.xpath("//*[@id='title']")).sendKeys("Title for Books and publications");
driver.findElement(By.xpath("//*[@id='description']")).sendKeys("Our products include furniture inspired by the Classics, including designers like Florence Knoll, Eero Saarinen, Arne Jacobsen, Charles Eames, Mies van der Rohe & many more. The product we offer is not competing with the lower priced imitations, we believe that our furniture should be suitable for use and last for");
driver.findElement(By.xpath("//*[@id='affcode']")).sendKeys("[email protected]");
driver.findElement(By.xpath("html/body/div[2]/div/div[2]/span[2]/table/tbody/tr[9]/td[2]/input")).click();
driver.quit();
}
}