Skip to content

Commit

Permalink
Merge pull request #4890 from jdi-testing/update_selenium
Browse files Browse the repository at this point in the history
Update selenium version
  • Loading branch information
pnatashap authored Apr 13, 2023
2 parents 675675f + b114fb1 commit e7a52b5
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ env:
PERFORMANCE: "jdi-performance"
PERFORMANCE_PROPERTY: "test-examples/jdi-performance"
VUETIFY_TESTS: "jdi-light-vuetify-tests"
CHROME_ARGS: "--no-sandbox --headless --disable-dev-shm-usage --disable-gpu --window-size=1920,1080 --remote-allow-origins=*"
CHROME_ARGS: "--no-sandbox --headless --disable-dev-shm-usage --disable-gpu --window-size=1920,1080"
FIREFOX_ARGS: "-headless"
ALLURE_VERSION: "2.13.8"
SUREFIRE_ARGS: "--add-opens java.base/java.lang=ALL-UNNAMED"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ Feature: MultiDropDown
Then the "Multi Dropdown" contains items:
| Disabled | Wood | Steam | Electro | Metalic |

@ignore_for_firefox
Scenario: Check disabled element value
When I select "Disabled" field from "Multi Dropdown"
Then the "Multi Dropdown" selected value is "Steam"
# @ignore_for_firefox
# selenuim does NOT allow changing in disabled dropdown anymore
# Scenario: Check disabled element value
# When I select "Disabled" field from "Multi Dropdown"
# Then the "Multi Dropdown" selected value is "Steam"

Scenario: Validation test
Given I open "Html5 Page"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ public void selectedTest() {
assertEquals(multiDropdown.selected(), defaultText);
}

@Test

// Selenium does NOT support attempts to change disabled dropdown
@Test(enabled = false)
public void disabledTest() {
skipForFirefox();
multiDropdown.select("Disabled");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ public void selectedTest() {
assertEquals(ages.checked(), Collections.singletonList(defaultText));
}

@Test
public void disabledTest() {
try {
ages.select("Disabled");
} catch (Exception ex) {
assertThat(safeException(ex), containsString("Can't perform click. Element is disabled"));
}
assertEquals(ages.selected(), defaultText);
}

@Test
public void labelTest() {
assertEquals(ages.label().getText(), "Age status:");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ public void sizeTest() {
assertEquals(dressCode2.size(), 4);
}

@Test
// Selenium does NOT support interact with disabled elements
@Test(enabled = false)
public void disabledTest() {
skipForFirefox();
disabledDropdown.select("Pirate");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ public void sizeTest() {
assertEquals(dressCode3.size(), 4);
}

@Test
// Selenium does NOT support interact with disable element anymore
@Test(enabled = false)
public void disabledTest() {
skipForFirefox();
disabledDropdown.select("Pirate");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ public void sizeTest() {
assertEquals(dressCode.size(), 4);
}

@Test
// current selenuim version doesn't allow to try any changes in disabled Dropdown
@Test(enabled = false)
public void disabledTest() {
skipForFirefox();
disabledDropdown.select("Pirate");
Expand Down
2 changes: 1 addition & 1 deletion jdi-light/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.4.0</version>
<version>4.8.3</version>
</dependency>
<dependency>
<groupId>com.jdiai.tools</groupId>
Expand Down

0 comments on commit e7a52b5

Please sign in to comment.