Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 3 additions & 25 deletions junit-4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<test.file></test.file>
<config.file>default</config.file>

<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencies>
Expand Down Expand Up @@ -47,11 +47,6 @@
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.browserstack</groupId>
<artifactId>automate-testassist</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>


Expand All @@ -60,24 +55,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
</plugin>
<plugin>
<groupId>com.browserstack</groupId>
<artifactId>automate-maven-plugin</artifactId>
<version>1.0.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<complianceLevel>1.8</complianceLevel>
</configuration>
<executions>
<execution>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<version>2.19.1</version>
</plugin>
</plugins>
</build>
Expand Down
2 changes: 1 addition & 1 deletion junit-4/src/test/java/com/browserstack/SingleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void test() throws URISyntaxException, IOException {
String product_name = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id='1']/p"))).getText();
WebElement cart_btn = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//*[@id='1']/div[4]")));
cart_btn.click();
wait.until(ExpectedConditions.visibilityOfElementLocated(By.className("float-cart__content")));
wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(".float\\-cart__content")));
final String product_in_cart = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id='__next']/div/div/div[2]/div[2]/div[2]/div/div[3]/p[1]"))).getText();
assertTrue(product_name.matches(product_in_cart));
mark(sessionId, "passed", "Product has been successfully added to the cart!");
Expand Down
9 changes: 0 additions & 9 deletions junit-4/src/test/resources/conf/parallel.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,10 @@
{
"browser": "chrome"
},
{
"browser": "firefox"
},
{
"browser": "safari",
"os": "OS X"
},
{
"browser": "Internet Explorer"
},
{
"device": "Samsung Galaxy S21"
},
{
"device": "iPhone 12"
}
Expand Down
2 changes: 1 addition & 1 deletion junit-5/src/test/java/tests/SingleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void singleTest(WebDriver driver) {
String product_name = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id='1']/p"))).getText();
WebElement cart_btn = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//*[@id='1']/div[4]")));
cart_btn.click();
wait.until(ExpectedConditions.visibilityOfElementLocated(By.className("float-cart__content")));
wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(".float\\-cart__content")));
final String product_in_cart = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id='__next']/div/div/div[2]/div[2]/div[2]/div/div[3]/p[1]"))).getText();
if (product_name.equals(product_in_cart)) {
sessionStatus.markTestStatus("passed", "Product has been successfully added to the cart!");
Expand Down
28 changes: 0 additions & 28 deletions junit-5/src/test/resources/caps.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,43 +51,15 @@
"os": "Windows",
"os_version": "10"
},
"safari": {
"browser": "safari",
"browser_version": "latest",
"os": "OS X",
"os_version": "Big Sur"
},
"firefox": {
"browser": "firefox",
"browser_version": "latest-2",
"os": "OS X",
"os_version": "Monterey"
},
"edge": {
"browser": "edge",
"browser_version": "latest",
"os": "Windows",
"os_version": "11"
},
"android": {
"device": "Samsung Galaxy S21",
"os_version": "11.0"
},
"ios": {
"device": "iPhone 12 Mini",
"os_version": "14"
},
"tab": {
"device": "Samsung Galaxy Tab S7"
},
"ipad": {
"device": "iPad Mini 2019"
},
"xiaomi": {
"device": "Xiaomi Redmi Note 9"
},
"oneplus": {
"device": "OnePlus 9"
}
}
}
Expand Down