Skip to content

Commit

Permalink
#593: correct tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bhecquet committed Mar 12, 2024
1 parent a348299 commit 515a5d5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public void testWrongPath() {
@Test(groups={"ut"})
public void testEdgeVersion() {
if (SystemUtils.IS_OS_WINDOWS) {
BrowserInfo bInfo = new BrowserInfo(BrowserType.EDGE, "115.0", null);
Assert.assertEquals(bInfo.getDriverFileName(), "edgedriver_115.0_edge-115-116");
BrowserInfo bInfo = new BrowserInfo(BrowserType.EDGE, "122.0", null);
Assert.assertEquals(bInfo.getDriverFileName(), "edgedriver_122.0_edge-122-123");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public void testLogNativeSeleniumElementActionNoOverride() throws Exception {
Assert.assertTrue(clickAction.getName().contains("click on Element located by"));
Assert.assertEquals(clickAction.getPage(), DriverTestPageNativeActions.class);
Assert.assertTrue(clickAction.getElement() instanceof SeleniumElement);
Assert.assertNull(clickAction.getElement().getCallingPage()); // calling page is null for native WebElements
Assert.assertTrue(clickAction.getElement().getCallingPage() instanceof DriverTestPageNativeActions);
Assert.assertEquals(clickAction.getElement().getOrigin(), "com.seleniumtests.it.driver.support.pages.DriverTestPageNativeActions");
Assert.assertNull(clickAction.getElement().getFieldName()); // null as created inline
Assert.assertNotNull(clickAction.getElement().getName());
Expand All @@ -257,7 +257,7 @@ public void testLogPageFactorySeleniumElementActionNoOverride() throws Exception
Assert.assertEquals(clickAction.getPage(), DriverTestPageObjectFatory.class);
Assert.assertTrue(clickAction.getElement() instanceof SeleniumElement);
Assert.assertEquals(clickAction.getElement().getOrigin(), "com.seleniumtests.it.driver.support.pages.DriverTestPageObjectFatory");
Assert.assertNull(clickAction.getElement().getCallingPage()); // calling page is null for native WebElements
Assert.assertTrue(clickAction.getElement().getCallingPage() instanceof DriverTestPageObjectFatory);
Assert.assertNull(clickAction.getElement().getFieldName()); // null as we don't support field name for page factory elements
// this could be possible as elements are initialized on page creation,
// but this is a marginal use case, so we ignore it deliberately
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ public void testToJsonWithException() throws IOException {
JSONObject stepJson = step.toJson();

Assert.assertEquals(stepJson.getString("type"), "step");
Assert.assertEquals(stepJson.getString("exception"), "class org.openqa.selenium.WebDriverException");
Assert.assertEquals(stepJson.getString("exception"), "org.openqa.selenium.WebDriverException");
Assert.assertTrue(stepJson.getString("exceptionMessage").contains("class org.openqa.selenium.WebDriverException: KO"));
Assert.assertEquals(stepJson.getString("name"), "step1");
Assert.assertEquals(stepJson.getString("status"), "WARNING");
Expand Down

0 comments on commit 515a5d5

Please sign in to comment.