-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTflstoretestTest.java
More file actions
80 lines (80 loc) · 3.26 KB
/
Copy pathTflstoretestTest.java
File metadata and controls
80 lines (80 loc) · 3.26 KB
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
// Generated by Selenium IDE
import org.junit.Test;
import org.junit.Before;
import org.junit.After;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.core.IsNot.not;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Alert;
import org.openqa.selenium.Keys;
import java.util.*;
import java.net.MalformedURLException;
import java.net.URL;
public class TflstoretestTest {
private WebDriver driver;
private Map<String, Object> vars;
JavascriptExecutor js;
@Before
public void setUp() {
driver = new ChromeDriver();
js = (JavascriptExecutor) driver;
vars = new HashMap<String, Object>();
}
@After
public void tearDown() {
driver.quit();
}
@Test
public void tflstoretest() {
driver.get("http://13.232.211.94:8000/");
driver.manage().window().setSize(new Dimension(782, 816));
driver.findElement(By.linkText("Gallery")).click();
driver.findElement(By.id("1")).click();
driver.findElement(By.cssSelector("button")).click();
driver.findElement(By.id("txtquantity")).click();
driver.findElement(By.id("txtquantity")).sendKeys("23");
driver.findElement(By.cssSelector("td:nth-child(1) > input")).click();
driver.findElement(By.cssSelector("tr:nth-child(3) > td:nth-child(2) > input")).click();
driver.findElement(By.linkText("About us")).click();
driver.findElement(By.linkText("Contact us")).click();
driver.findElement(By.linkText("Sign In")).click();
driver.findElement(By.linkText("Gallery")).click();
driver.findElement(By.id("2")).click();
driver.findElement(By.cssSelector("button")).click();
driver.findElement(By.id("txtquantity")).click();
driver.findElement(By.id("txtquantity")).click();
{
WebElement element = driver.findElement(By.id("txtquantity"));
Actions builder = new Actions(driver);
builder.doubleClick(element).perform();
}
driver.findElement(By.id("txtquantity")).sendKeys("10");
driver.findElement(By.cssSelector("td:nth-child(1) > input")).click();
driver.findElement(By.cssSelector("tr:nth-child(3) > td:nth-child(2) > input")).click();
driver.findElement(By.cssSelector("td:nth-child(3) > input")).click();
driver.findElement(By.linkText("Gallery")).click();
driver.findElement(By.id("3")).click();
driver.findElement(By.cssSelector("button")).click();
driver.findElement(By.id("txtquantity")).click();
driver.findElement(By.id("txtquantity")).click();
{
WebElement element = driver.findElement(By.id("txtquantity"));
Actions builder = new Actions(driver);
builder.doubleClick(element).perform();
}
driver.findElement(By.id("txtquantity")).sendKeys("6");
driver.findElement(By.cssSelector("td:nth-child(1) > input")).click();
}
}