File tree 5 files changed +8
-20
lines changed
src/test/java/com/browserstack/pageobjects
5 files changed +8
-20
lines changed Original file line number Diff line number Diff line change 12
12
- Install dependencies ` mvn compile `
13
13
- To run the test suite having cross-platform with parallelization, run ` mvn test -P sample-test `
14
14
- To run local tests, run ` mvn test -P sample-local-test `
15
+ - To view Allure Reports, run ` allure serve target/allure-results `
15
16
16
17
Understand how many parallel sessions you need by using our [ Parallel Test Calculator] ( https://www.browserstack.com/automate/parallel-calculator?ref=github )
17
18
Original file line number Diff line number Diff line change @@ -31,11 +31,11 @@ framework: cucumber-testng
31
31
platforms :
32
32
- os : OS X
33
33
osVersion : Big Sur
34
- browser : Chrome
34
+ browserName : Chrome
35
35
browserVersion : latest
36
36
- os : Windows
37
37
osVersion : 10
38
- browser : Edge
38
+ browserName : Edge
39
39
browserVersion : latest
40
40
- device : Samsung Galaxy S22 Ultra
41
41
browserName : chrome # Try 'samsung' for Samsung browser
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ repositories {
7
7
}
8
8
9
9
dependencies {
10
- implementation ' org.seleniumhq.selenium:selenium-java:3.141.59 '
10
+ implementation ' org.seleniumhq.selenium:selenium-java:4.1.4 '
11
11
testImplementation ' io.cucumber:cucumber-java:7.3.4'
12
12
testImplementation ' io.cucumber:cucumber-testng:7.3.4'
13
13
testImplementation ' io.cucumber:cucumber-core:7.3.4'
Original file line number Diff line number Diff line change 16
16
<maven .compiler.target>1.8</maven .compiler.target>
17
17
<cucumber .version>7.4.1</cucumber .version>
18
18
<testng .version>7.4.0</testng .version>
19
- <selenium-java .version>3.141.59 </selenium-java .version>
19
+ <selenium-java .version>4.1.4 </selenium-java .version>
20
20
<browserstack-local-java .version>1.0.6</browserstack-local-java .version>
21
21
<json-simple .version>1.1.1</json-simple .version>
22
22
<browserstack-java-sdk .version>LATEST</browserstack-java-sdk .version>
47
47
<version >${selenium-java.version} </version >
48
48
<scope >test</scope >
49
49
</dependency >
50
- <dependency >
51
- <groupId >com.browserstack</groupId >
52
- <artifactId >browserstack-local-java</artifactId >
53
- <version >${browserstack-local-java.version} </version >
54
- </dependency >
55
50
<dependency >
56
51
<groupId >com.browserstack</groupId >
57
52
<artifactId >browserstack-java-sdk</artifactId >
58
53
<version >${browserstack-java-sdk.version} </version >
59
54
<scope >compile</scope >
60
55
</dependency >
61
- <dependency >
62
- <groupId >com.googlecode.json-simple</groupId >
63
- <artifactId >json-simple</artifactId >
64
- <version >${json-simple.version} </version >
65
- </dependency >
66
- <dependency >
67
- <groupId >org.apache.commons</groupId >
68
- <artifactId >commons-lang3</artifactId >
69
- <version >3.11</version >
70
- </dependency >
71
56
<dependency >
72
57
<groupId >io.qameta.allure</groupId >
73
58
<artifactId >allure-testng</artifactId >
Original file line number Diff line number Diff line change 5
5
import org .openqa .selenium .support .ui .ExpectedConditions ;
6
6
import org .openqa .selenium .support .ui .WebDriverWait ;
7
7
8
+ import java .time .Duration ;
9
+
8
10
public class HomePage {
9
11
private WebDriver webDriver ;
10
12
@@ -33,7 +35,7 @@ public void clickAddToCartButton() {
33
35
}
34
36
35
37
public void waitForCartToOpen () {
36
- new WebDriverWait (webDriver ,30 ).until (ExpectedConditions .visibilityOfAllElementsLocatedBy (cartPane ));
38
+ new WebDriverWait (webDriver , Duration . ofSeconds ( 30 ) ).until (ExpectedConditions .visibilityOfAllElementsLocatedBy (cartPane ));
37
39
}
38
40
39
41
public String getProductCartText () {
You can’t perform that action at this time.
0 commit comments