Skip to content
Open
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
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<cucumber.version>7.4.1</cucumber.version>
<testng.version>7.4.0</testng.version>
<testng.version>7.5.1</testng.version>
<playwright.version>1.55.0</playwright.version>
<browserstack-local-java.version>1.0.6</browserstack-local-java.version>
<snakeyaml.version>2.0</snakeyaml.version>
<json.version>20210307</json.version>
<json.version>20231013</json.version>
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class StackDemoSteps {
private static final String PRODUCT_IN_CART = "//*[@id=\"__next\"]/div/div/div[2]/div[2]/div[2]/div/div[3]/p[1]";

@Before
public void setUp(Scenario scenario) {
public void setUp(Scenario scenario) throws Exception {
playwright = Playwright.create();
BrowserType browserType = playwright.chromium();

Expand All @@ -53,7 +53,7 @@ public void setUp(Scenario scenario) {
caps.put("browser", "chrome");
caps.put("sessionName", scenario.getName());

String encoded = URLEncoder.encode(new JSONObject(caps).toString(), StandardCharsets.UTF_8);
String encoded = URLEncoder.encode(new JSONObject(caps).toString(), "UTF-8");
String wsEndpoint = "wss://cdp.browserstack.com/playwright?caps=" + encoded;

browser = browserType.connect(wsEndpoint);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class StackLocalSteps {
private Page page;

@Before
public void setUp(Scenario scenario) {
public void setUp(Scenario scenario) throws Exception {
playwright = Playwright.create();
BrowserType browserType = playwright.chromium();

Expand All @@ -45,7 +45,7 @@ public void setUp(Scenario scenario) {
caps.put("browserstack.local", "true");
caps.put("sessionName", scenario.getName());

String encoded = URLEncoder.encode(new JSONObject(caps).toString(), StandardCharsets.UTF_8);
String encoded = URLEncoder.encode(new JSONObject(caps).toString(), "UTF-8");
String wsEndpoint = "wss://cdp.browserstack.com/playwright?caps=" + encoded;

browser = browserType.connect(wsEndpoint);
Expand Down
Loading