Skip to content

Commit 40c22da

Browse files
chore: Bump minimum selenium api version to 4.2.0 (#1696)
1 parent 1a970e4 commit 40c22da

File tree

7 files changed

+16
-12
lines changed

7 files changed

+16
-12
lines changed

build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,23 @@ ext {
2929

3030
dependencies {
3131
compileOnly 'org.projectlombok:lombok:1.18.24'
32-
annotationProcessor 'org.projectlombok:lombok:1.18.22'
32+
annotationProcessor 'org.projectlombok:lombok:1.18.24'
3333

3434
api ('org.seleniumhq.selenium:selenium-api') {
3535
version {
36-
strictly '[4.0, 5.0)'
36+
strictly "[${seleniumVersion}, 5.0)"
3737
prefer "${seleniumVersion}"
3838
}
3939
}
4040
api ('org.seleniumhq.selenium:selenium-remote-driver') {
4141
version {
42-
strictly '[4.0, 5.0)'
42+
strictly "[${seleniumVersion}, 5.0)"
4343
prefer "${seleniumVersion}"
4444
}
4545
}
4646
implementation ('org.seleniumhq.selenium:selenium-support') {
4747
version {
48-
strictly '[4.0, 5.0)'
48+
strictly "[${seleniumVersion}, 5.0)"
4949
prefer "${seleniumVersion}"
5050
}
5151
}
@@ -64,7 +64,7 @@ dependencies {
6464
}
6565
testImplementation ('org.seleniumhq.selenium:selenium-chrome-driver') {
6666
version {
67-
strictly '[4.0, 5.0)'
67+
strictly "[${seleniumVersion}, 5.0)"
6868
prefer "${seleniumVersion}"
6969
}
7070
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ signing.secretKeyRingFile=PathToYourKeyRingFile
77
ossrhUsername=your-jira-id
88
ossrhPassword=your-jira-password
99

10-
selenium.version=4.1.1
10+
selenium.version=4.2.0

src/main/java/io/appium/java_client/remote/AppiumNewSessionCommandPayload.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import com.google.common.collect.ImmutableSet;
2121
import org.openqa.selenium.Capabilities;
2222
import org.openqa.selenium.internal.Require;
23-
import org.openqa.selenium.remote.AcceptedW3CCapabilityKeys;
23+
import org.openqa.selenium.AcceptedW3CCapabilityKeys;
2424
import org.openqa.selenium.remote.CommandPayload;
2525

2626
import java.util.Map;

src/main/java/io/appium/java_client/remote/options/BaseOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import org.openqa.selenium.Platform;
2222
import org.openqa.selenium.WebDriverException;
2323
import org.openqa.selenium.internal.Require;
24-
import org.openqa.selenium.remote.AcceptedW3CCapabilityKeys;
24+
import org.openqa.selenium.AcceptedW3CCapabilityKeys;
2525
import org.openqa.selenium.remote.CapabilityType;
2626

2727
import javax.annotation.Nullable;

src/test/java/io/appium/java_client/android/AndroidDataMatcherTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@
2424
import org.openqa.selenium.support.ui.ExpectedConditions;
2525
import org.openqa.selenium.support.ui.WebDriverWait;
2626

27+
import java.time.Duration;
28+
2729
import static org.junit.Assert.assertNotNull;
2830

2931
public class AndroidDataMatcherTest extends BaseEspressoTest {
3032

3133
@Test
3234
public void testFindByDataMatcher() {
33-
final WebDriverWait wait = new WebDriverWait(driver, 10);
35+
final WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));
3436
wait.until(ExpectedConditions
3537
.elementToBeClickable(AppiumBy.accessibilityId("Graphics")));
3638
driver.findElement(AppiumBy.accessibilityId("Graphics")).click();

src/test/java/io/appium/java_client/android/OpenNotificationsTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
import org.openqa.selenium.WebElement;
99
import org.openqa.selenium.support.ui.WebDriverWait;
1010

11+
import java.time.Duration;
1112
import java.util.List;
1213

1314
public class OpenNotificationsTest extends BaseAndroidTest {
1415
@Test
1516
public void openNotification() {
1617
driver.closeApp();
1718
driver.openNotifications();
18-
WebDriverWait wait = new WebDriverWait(driver, 20);
19+
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(20));
1920
assertNotEquals(0, wait.until(input -> {
2021
List<WebElement> result = input
2122
.findElements(id("com.android.systemui:id/settings_button"));

src/test/java/io/appium/java_client/ios/IOSAlertTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,16 @@
3030
import org.openqa.selenium.WebDriverException;
3131
import org.openqa.selenium.support.ui.WebDriverWait;
3232

33+
import java.time.Duration;
3334
import java.util.function.Supplier;
3435

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

38-
private static final long ALERT_TIMEOUT_SECONDS = 5;
39+
private static final Duration ALERT_TIMEOUT = Duration.ofSeconds(5);
3940
private static final int CLICK_RETRIES = 2;
4041

41-
private final WebDriverWait waiter = new WebDriverWait(driver, ALERT_TIMEOUT_SECONDS);
42+
private final WebDriverWait waiter = new WebDriverWait(driver, ALERT_TIMEOUT);
4243
private static final String iOSAutomationText = "show alert";
4344

4445
private void ensureAlertPresence() {

0 commit comments

Comments
 (0)