Skip to content

chore: Bump minimum selenium api version to 4.2.0 #1696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2022
Merged
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
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,23 @@ ext {

dependencies {
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.24'

api ('org.seleniumhq.selenium:selenium-api') {
version {
strictly '[4.0, 5.0)'
strictly "[${seleniumVersion}, 5.0)"
prefer "${seleniumVersion}"
}
}
api ('org.seleniumhq.selenium:selenium-remote-driver') {
version {
strictly '[4.0, 5.0)'
strictly "[${seleniumVersion}, 5.0)"
prefer "${seleniumVersion}"
}
}
implementation ('org.seleniumhq.selenium:selenium-support') {
version {
strictly '[4.0, 5.0)'
strictly "[${seleniumVersion}, 5.0)"
prefer "${seleniumVersion}"
}
}
Expand All @@ -64,7 +64,7 @@ dependencies {
}
testImplementation ('org.seleniumhq.selenium:selenium-chrome-driver') {
version {
strictly '[4.0, 5.0)'
strictly "[${seleniumVersion}, 5.0)"
prefer "${seleniumVersion}"
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ signing.secretKeyRingFile=PathToYourKeyRingFile
ossrhUsername=your-jira-id
ossrhPassword=your-jira-password

selenium.version=4.1.1
selenium.version=4.2.0
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.google.common.collect.ImmutableSet;
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.internal.Require;
import org.openqa.selenium.remote.AcceptedW3CCapabilityKeys;
import org.openqa.selenium.AcceptedW3CCapabilityKeys;
import org.openqa.selenium.remote.CommandPayload;

import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.openqa.selenium.Platform;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.internal.Require;
import org.openqa.selenium.remote.AcceptedW3CCapabilityKeys;
import org.openqa.selenium.AcceptedW3CCapabilityKeys;
import org.openqa.selenium.remote.CapabilityType;

import javax.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

import java.time.Duration;

import static org.junit.Assert.assertNotNull;

public class AndroidDataMatcherTest extends BaseEspressoTest {

@Test
public void testFindByDataMatcher() {
final WebDriverWait wait = new WebDriverWait(driver, 10);
final WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));
wait.until(ExpectedConditions
.elementToBeClickable(AppiumBy.accessibilityId("Graphics")));
driver.findElement(AppiumBy.accessibilityId("Graphics")).click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.WebDriverWait;

import java.time.Duration;
import java.util.List;

public class OpenNotificationsTest extends BaseAndroidTest {
@Test
public void openNotification() {
driver.closeApp();
driver.openNotifications();
WebDriverWait wait = new WebDriverWait(driver, 20);
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(20));
assertNotEquals(0, wait.until(input -> {
List<WebElement> result = input
.findElements(id("com.android.systemui:id/settings_button"));
Expand Down
5 changes: 3 additions & 2 deletions src/test/java/io/appium/java_client/ios/IOSAlertTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.support.ui.WebDriverWait;

import java.time.Duration;
import java.util.function.Supplier;

@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class IOSAlertTest extends AppIOSTest {

private static final long ALERT_TIMEOUT_SECONDS = 5;
private static final Duration ALERT_TIMEOUT = Duration.ofSeconds(5);
private static final int CLICK_RETRIES = 2;

private final WebDriverWait waiter = new WebDriverWait(driver, ALERT_TIMEOUT_SECONDS);
private final WebDriverWait waiter = new WebDriverWait(driver, ALERT_TIMEOUT);
private static final String iOSAutomationText = "show alert";

private void ensureAlertPresence() {
Expand Down