Skip to content

Commit

Permalink
Update dependency com.saucelabs:saucebindings-junit4 to v1.5.0 (#187)
Browse files Browse the repository at this point in the history
* Update dependency com.saucelabs:saucebindings-junit4 to v1.5.0

* Fixing tests

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Diego Molina <[email protected]>
  • Loading branch information
renovate[bot] and diemol authored Jul 15, 2024
1 parent 2f7c2d7 commit e220320
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion selenium-junit4-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<dependency>
<groupId>com.saucelabs</groupId>
<artifactId>saucebindings-junit4</artifactId>
<version>1.0.1</version>
<version>1.5.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void signInSuccessful() {
driver.findElement(By.cssSelector("input[data-test='login-button']")).click();

Assert.assertEquals(
"https://www.saucedemo.com/inventory.html", driver.getCurrentUrl(), "Login Not Successful");
"Login Not Successful", "https://www.saucedemo.com/inventory.html", driver.getCurrentUrl());
}

@Test
Expand All @@ -49,6 +49,6 @@ public void logout() throws InterruptedException {
driver.findElement(By.id("logout_sidebar_link")).click();

Assert.assertEquals(
"https://www.saucedemo.com/", driver.getCurrentUrl(), "Logout Not Successful");
"Logout Not Successful", "https://www.saucedemo.com/", driver.getCurrentUrl());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ public void addFromProductPage() {
driver.findElement(By.cssSelector("input[data-test='password']")).sendKeys("secret_sauce");
driver.findElement(By.cssSelector("input[data-test='login-button']")).click();

driver.findElement(By.id("item_1_title_link")).click();
// driver.findElement(By.id("item_1_title_link")).click();

driver
.findElement(By.cssSelector("button[data-test='add-to-cart-sauce-labs-bolt-t-shirt']"))
.click();

Assert.assertEquals(
"Item not correctly added to cart",
"1",
driver.findElement(By.className("shopping_cart_badge")).getText(),
"Item not correctly added to cart");
driver.findElement(By.className("shopping_cart_badge")).getText());
}

@Test
Expand All @@ -37,7 +37,6 @@ public void removeFromProductPage() {
driver.findElement(By.cssSelector("input[data-test='username']")).sendKeys("standard_user");
driver.findElement(By.cssSelector("input[data-test='password']")).sendKeys("secret_sauce");
driver.findElement(By.cssSelector("input[data-test='login-button']")).click();
driver.findElement(By.id("item_1_title_link")).click();
driver
.findElement(By.cssSelector("button[data-test='add-to-cart-sauce-labs-bolt-t-shirt']"))
.click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public void goodInfo() {
driver.findElement(By.cssSelector("input[data-test='continue']")).click();

Assert.assertEquals(
"Information Submission Unsuccessful",
"https://www.saucedemo.com/checkout-step-two.html",
driver.getCurrentUrl(),
"Information Submission Unsuccessful");
driver.getCurrentUrl());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ protected void startSession(Capabilities options, Map<String, Object> sauceOptio

sauceOptions.put("username", System.getenv("SAUCE_USERNAME"));
sauceOptions.put("accessKey", System.getenv("SAUCE_ACCESS_KEY"));
sauceOptions.put("name", testName);
sauceOptions.put("name", testName.getMethodName());
sauceOptions.put("screenResolution", "1440x900");
sauceOptions.put("seleniumVersion", "4.14.1");
((MutableCapabilities) options).setCapability("sauce:options", sauceOptions);
((AbstractDriverOptions<?>) options).setPlatformName("Windows 11");
Expand Down

0 comments on commit e220320

Please sign in to comment.