From 43ff656ee555a2c3003279dddcde71be5170d3c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Apr 2021 17:47:02 +0530 Subject: [PATCH 001/582] build(deps): bump spring-context from 5.3.5 to 5.3.6 (#1464) Bumps [spring-context](https://github.com/spring-projects/spring-framework) from 5.3.5 to 5.3.6. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.5...v5.3.6) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 1ab759596..801a14af1 100644 --- a/build.gradle +++ b/build.gradle @@ -78,7 +78,7 @@ dependencies { implementation 'commons-validator:commons-validator:1.7' implementation 'org.apache.commons:commons-lang3:3.12.0' implementation 'commons-io:commons-io:2.8.0' - implementation 'org.springframework:spring-context:5.3.5' + implementation 'org.springframework:spring-context:5.3.6' implementation 'org.aspectj:aspectjweaver:1.9.6' implementation 'org.slf4j:slf4j-api:1.7.30' From 96ad4acdd3dd4b19940d6724e2f3ffeeb0227a7e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Apr 2021 17:33:38 +0300 Subject: [PATCH 002/582] build(deps): bump webdrivermanager from 4.4.0 to 4.4.1 (#1466) Bumps [webdrivermanager](https://github.com/bonigarcia/webdrivermanager) from 4.4.0 to 4.4.1. - [Release notes](https://github.com/bonigarcia/webdrivermanager/releases) - [Changelog](https://github.com/bonigarcia/webdrivermanager/blob/master/CHANGELOG.md) - [Commits](https://github.com/bonigarcia/webdrivermanager/compare/webdrivermanager-4.4.0...webdrivermanager-4.4.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 801a14af1..937ed4d71 100644 --- a/build.gradle +++ b/build.gradle @@ -84,7 +84,7 @@ dependencies { testImplementation 'junit:junit:4.13.2' testImplementation 'org.hamcrest:hamcrest:2.2' - testImplementation (group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '4.4.0') { + testImplementation (group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '4.4.1') { exclude group: 'org.seleniumhq.selenium' } } From 2a48d015d38a2c98862da6696d9534f90967cbed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 21:09:25 +0530 Subject: [PATCH 003/582] build(deps): bump webdrivermanager from 4.4.1 to 4.4.3 (#1471) Bumps [webdrivermanager](https://github.com/bonigarcia/webdrivermanager) from 4.4.1 to 4.4.3. - [Release notes](https://github.com/bonigarcia/webdrivermanager/releases) - [Changelog](https://github.com/bonigarcia/webdrivermanager/blob/master/CHANGELOG.md) - [Commits](https://github.com/bonigarcia/webdrivermanager/compare/webdrivermanager-4.4.1...webdrivermanager-4.4.3) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 937ed4d71..fd1192957 100644 --- a/build.gradle +++ b/build.gradle @@ -84,7 +84,7 @@ dependencies { testImplementation 'junit:junit:4.13.2' testImplementation 'org.hamcrest:hamcrest:2.2' - testImplementation (group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '4.4.1') { + testImplementation (group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '4.4.3') { exclude group: 'org.seleniumhq.selenium' } } From dcc7579934d15b0aa87127f83a70b26746afdfab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 18:06:30 +0530 Subject: [PATCH 004/582] build(deps): bump spring-context from 5.3.6 to 5.3.7 (#1472) Bumps [spring-context](https://github.com/spring-projects/spring-framework) from 5.3.6 to 5.3.7. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.6...v5.3.7) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index fd1192957..12e6c224f 100644 --- a/build.gradle +++ b/build.gradle @@ -78,7 +78,7 @@ dependencies { implementation 'commons-validator:commons-validator:1.7' implementation 'org.apache.commons:commons-lang3:3.12.0' implementation 'commons-io:commons-io:2.8.0' - implementation 'org.springframework:spring-context:5.3.6' + implementation 'org.springframework:spring-context:5.3.7' implementation 'org.aspectj:aspectjweaver:1.9.6' implementation 'org.slf4j:slf4j-api:1.7.30' From b3001672d25a42bd5033123cc6bd934d599d8f04 Mon Sep 17 00:00:00 2001 From: Dmitry Mishtal Date: Thu, 20 May 2021 19:48:19 +0300 Subject: [PATCH 005/582] fix: bind mac2element in element map for mac platform (#1474) --- src/main/java/io/appium/java_client/internal/ElementMap.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/appium/java_client/internal/ElementMap.java b/src/main/java/io/appium/java_client/internal/ElementMap.java index daeb644fb..d2f056c5d 100644 --- a/src/main/java/io/appium/java_client/internal/ElementMap.java +++ b/src/main/java/io/appium/java_client/internal/ElementMap.java @@ -23,6 +23,7 @@ import io.appium.java_client.MobileElement; import io.appium.java_client.android.AndroidElement; import io.appium.java_client.ios.IOSElement; +import io.appium.java_client.mac.Mac2Element; import io.appium.java_client.remote.AutomationName; import io.appium.java_client.remote.MobilePlatform; import io.appium.java_client.windows.WindowsElement; @@ -37,8 +38,8 @@ public enum ElementMap { IOS_XCUI_TEST(AutomationName.IOS_XCUI_TEST.toLowerCase(), IOSElement.class), ANDROID_UI_AUTOMATOR(MobilePlatform.ANDROID.toLowerCase(), AndroidElement.class), IOS_UI_AUTOMATION(MobilePlatform.IOS.toLowerCase(), IOSElement.class), - WINDOWS(MobilePlatform.WINDOWS.toLowerCase(), WindowsElement.class); - + WINDOWS(MobilePlatform.WINDOWS.toLowerCase(), WindowsElement.class), + MAC(MobilePlatform.MAC.toLowerCase(), Mac2Element.class); private static final Map mobileElementMap; From 023cf3f359058a78b000d969eed9326224f5dc1f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 May 2021 19:12:26 +0530 Subject: [PATCH 006/582] build(deps): bump commons-io from 2.8.0 to 2.9.0 (#1480) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 12e6c224f..ef4b24afa 100644 --- a/build.gradle +++ b/build.gradle @@ -77,7 +77,7 @@ dependencies { implementation 'cglib:cglib:3.3.0' implementation 'commons-validator:commons-validator:1.7' implementation 'org.apache.commons:commons-lang3:3.12.0' - implementation 'commons-io:commons-io:2.8.0' + implementation 'commons-io:commons-io:2.9.0' implementation 'org.springframework:spring-context:5.3.7' implementation 'org.aspectj:aspectjweaver:1.9.6' implementation 'org.slf4j:slf4j-api:1.7.30' From 4415440ec509ba964e50428565657a8e064d0c59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 May 2021 19:12:59 +0530 Subject: [PATCH 007/582] build(deps): bump gson from 2.8.6 to 2.8.7 (#1479) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index ef4b24afa..02170dd58 100644 --- a/build.gradle +++ b/build.gradle @@ -72,7 +72,7 @@ dependencies { strictly "${project.property('selenium.version')}" } } - implementation 'com.google.code.gson:gson:2.8.6' + implementation 'com.google.code.gson:gson:2.8.7' implementation 'org.apache.httpcomponents:httpclient:4.5.13' implementation 'cglib:cglib:3.3.0' implementation 'commons-validator:commons-validator:1.7' From 927db522c2ec057f16ed8eef516b00cc6a8dc232 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 May 2021 19:15:29 +0530 Subject: [PATCH 008/582] build(deps): bump org.owasp.dependencycheck from 6.1.5 to 6.2.0 (#1478) Bumps org.owasp.dependencycheck from 6.1.5 to 6.2.0. Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 02170dd58..44147faae 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { id 'jacoco' id 'checkstyle' id 'signing' - id 'org.owasp.dependencycheck' version '6.1.5' + id 'org.owasp.dependencycheck' version '6.2.0' id 'com.github.johnrengelman.shadow' version '6.1.0' } From 5089dbcaf804d96d57c4eb0ed16f255059a11182 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Jun 2021 15:17:54 +0300 Subject: [PATCH 009/582] build(deps): bump commons-io from 2.9.0 to 2.10.0 (#1483) Bumps commons-io from 2.9.0 to 2.10.0. --- updated-dependencies: - dependency-name: commons-io:commons-io dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 44147faae..81483536f 100644 --- a/build.gradle +++ b/build.gradle @@ -77,7 +77,7 @@ dependencies { implementation 'cglib:cglib:3.3.0' implementation 'commons-validator:commons-validator:1.7' implementation 'org.apache.commons:commons-lang3:3.12.0' - implementation 'commons-io:commons-io:2.9.0' + implementation 'commons-io:commons-io:2.10.0' implementation 'org.springframework:spring-context:5.3.7' implementation 'org.aspectj:aspectjweaver:1.9.6' implementation 'org.slf4j:slf4j-api:1.7.30' From d1e5fa7d16eada87413893cbcfe8f6b1ce82d404 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Jun 2021 16:45:24 +0300 Subject: [PATCH 010/582] build(deps): bump spring-context from 5.3.7 to 5.3.8 (#1485) Bumps [spring-context](https://github.com/spring-projects/spring-framework) from 5.3.7 to 5.3.8. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.7...v5.3.8) --- updated-dependencies: - dependency-name: org.springframework:spring-context dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 81483536f..cd04bca27 100644 --- a/build.gradle +++ b/build.gradle @@ -78,7 +78,7 @@ dependencies { implementation 'commons-validator:commons-validator:1.7' implementation 'org.apache.commons:commons-lang3:3.12.0' implementation 'commons-io:commons-io:2.10.0' - implementation 'org.springframework:spring-context:5.3.7' + implementation 'org.springframework:spring-context:5.3.8' implementation 'org.aspectj:aspectjweaver:1.9.6' implementation 'org.slf4j:slf4j-api:1.7.30' From ceac42837ffe5fe7400c54d802e96318961698a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Jun 2021 11:01:25 +0300 Subject: [PATCH 011/582] build(deps): bump ecj from 3.25.0 to 3.26.0 (#1487) Bumps ecj from 3.25.0 to 3.26.0. --- updated-dependencies: - dependency-name: org.eclipse.jdt:ecj dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index cd04bca27..e6f02ac48 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ configurations { } dependencies { - ecj 'org.eclipse.jdt:ecj:3.25.0' + ecj 'org.eclipse.jdt:ecj:3.26.0' lombok 'org.projectlombok:lombok:1.18.20' } From 979e6bdc0c472239ec8390d9cf24c064d4cc6aef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Jun 2021 11:49:28 +0530 Subject: [PATCH 012/582] build(deps): bump slf4j-api from 1.7.30 to 1.7.31 (#1486) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e6f02ac48..3afc246f8 100644 --- a/build.gradle +++ b/build.gradle @@ -80,7 +80,7 @@ dependencies { implementation 'commons-io:commons-io:2.10.0' implementation 'org.springframework:spring-context:5.3.8' implementation 'org.aspectj:aspectjweaver:1.9.6' - implementation 'org.slf4j:slf4j-api:1.7.30' + implementation 'org.slf4j:slf4j-api:1.7.31' testImplementation 'junit:junit:4.13.2' testImplementation 'org.hamcrest:hamcrest:2.2' From 93a95fc689a116ac14f3bf8739037033a63f03f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Jun 2021 22:47:03 +0300 Subject: [PATCH 013/582] build(deps): bump aspectjweaver from 1.9.6 to 1.9.7 (#1490) Bumps [aspectjweaver](https://github.com/eclipse/org.aspectj) from 1.9.6 to 1.9.7. - [Release notes](https://github.com/eclipse/org.aspectj/releases) - [Commits](https://github.com/eclipse/org.aspectj/commits) --- updated-dependencies: - dependency-name: org.aspectj:aspectjweaver dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 3afc246f8..948485713 100644 --- a/build.gradle +++ b/build.gradle @@ -79,7 +79,7 @@ dependencies { implementation 'org.apache.commons:commons-lang3:3.12.0' implementation 'commons-io:commons-io:2.10.0' implementation 'org.springframework:spring-context:5.3.8' - implementation 'org.aspectj:aspectjweaver:1.9.6' + implementation 'org.aspectj:aspectjweaver:1.9.7' implementation 'org.slf4j:slf4j-api:1.7.31' testImplementation 'junit:junit:4.13.2' From a1e1d1d0702b45601593dda0679babac8266f416 Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Thu, 1 Jul 2021 20:52:02 +0200 Subject: [PATCH 014/582] feat: Add support of extended Android geolocation (#1492) --- .../java_client/android/AndroidDriver.java | 3 +- .../geolocation/AndroidGeoLocation.java | 125 ++++++++++++++++++ .../SupportsExtendedGeolocationCommands.java | 40 ++++++ 3 files changed, 167 insertions(+), 1 deletion(-) create mode 100644 src/main/java/io/appium/java_client/android/geolocation/AndroidGeoLocation.java create mode 100644 src/main/java/io/appium/java_client/android/geolocation/SupportsExtendedGeolocationCommands.java diff --git a/src/main/java/io/appium/java_client/android/AndroidDriver.java b/src/main/java/io/appium/java_client/android/AndroidDriver.java index 62016e814..1994bb69a 100644 --- a/src/main/java/io/appium/java_client/android/AndroidDriver.java +++ b/src/main/java/io/appium/java_client/android/AndroidDriver.java @@ -33,6 +33,7 @@ import io.appium.java_client.HasOnScreenKeyboard; import io.appium.java_client.LocksDevice; import io.appium.java_client.android.connection.HasNetworkConnection; +import io.appium.java_client.android.geolocation.SupportsExtendedGeolocationCommands; import io.appium.java_client.android.nativekey.PressesKey; import io.appium.java_client.battery.HasBattery; import io.appium.java_client.remote.MobilePlatform; @@ -68,7 +69,7 @@ public class AndroidDriver HasSupportedPerformanceDataType, AuthenticatesByFinger, HasOnScreenKeyboard, CanRecordScreen, SupportsSpecialEmulatorCommands, SupportsNetworkStateManagement, ListensToLogcatMessages, HasAndroidClipboard, - HasBattery, ExecuteCDPCommand { + HasBattery, ExecuteCDPCommand, SupportsExtendedGeolocationCommands { private static final String ANDROID_PLATFORM = MobilePlatform.ANDROID; diff --git a/src/main/java/io/appium/java_client/android/geolocation/AndroidGeoLocation.java b/src/main/java/io/appium/java_client/android/geolocation/AndroidGeoLocation.java new file mode 100644 index 000000000..9ab204317 --- /dev/null +++ b/src/main/java/io/appium/java_client/android/geolocation/AndroidGeoLocation.java @@ -0,0 +1,125 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * See the NOTICE file distributed with this work for additional + * information regarding copyright ownership. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.appium.java_client.android.geolocation; + +import com.google.common.collect.ImmutableMap; + +import java.util.Map; + +import static java.util.Optional.ofNullable; + +public class AndroidGeoLocation { + private Double longitude; + private Double latitude; + private Double altitude; + private Integer satellites; + private Double speed; + + /** + * Initializes AndroidLocation instance. + */ + public AndroidGeoLocation() { + + } + + /** + * Initializes AndroidLocation instance with longitude and latitude values. + * + * @param longitude longitude value + * @param latitude latitude value + */ + public AndroidGeoLocation(double longitude, double latitude) { + this.longitude = longitude; + this.latitude = latitude; + } + + /** + * Sets geo longitude value. This value is required to set. + * + * @param longitude geo longitude + * @return self instance for chaining + */ + public AndroidGeoLocation withLongitude(double longitude) { + this.longitude = longitude; + return this; + } + + /** + * Sets geo latitude value. This value is required to set. + * + * @param latitude geo latitude + * @return self instance for chaining + */ + public AndroidGeoLocation withLatitude(double latitude) { + this.latitude = latitude; + return this; + } + + /** + * Sets geo altitude value. + * + * @param altitude geo altitude + * @return self instance for chaining + */ + public AndroidGeoLocation withAltitude(double altitude) { + this.altitude = altitude; + return this; + } + + /** + * Sets the number of geo satellites being tracked. + * This number is respected on Emulators. + * + * @param satellites the count of satellites in range 1..12 + * @return self instance for chaining + */ + public AndroidGeoLocation withSatellites(int satellites) { + this.satellites = satellites; + return this; + } + + /** + * Sets the movement speed. It is measured in meters/second + * for real devices and in knots for emulators. + * + * @param speed the actual speed, which should be greater than zero + * @return self instance for chaining + */ + public AndroidGeoLocation withSpeed(double speed) { + this.speed = speed; + return this; + } + + /** + * Builds parameters map suitable for passing to the downstream API. + * + * @return Parameters mapping + */ + public Map build() { + ImmutableMap.Builder builder = ImmutableMap.builder(); + ofNullable(longitude).map(x -> builder.put("longitude", x)) + .orElseThrow(() -> new IllegalArgumentException( + "A valid 'longitude' must be provided")); + ofNullable(latitude).map(x -> builder.put("latitude", x)) + .orElseThrow(() -> new IllegalArgumentException( + "A valid 'latitude' must be provided")); + ofNullable(altitude).map(x -> builder.put("altitude", x)); + ofNullable(satellites).map(x -> builder.put("satellites", x)); + ofNullable(speed).map(x -> builder.put("speed", x)); + return builder.build(); + } +} diff --git a/src/main/java/io/appium/java_client/android/geolocation/SupportsExtendedGeolocationCommands.java b/src/main/java/io/appium/java_client/android/geolocation/SupportsExtendedGeolocationCommands.java new file mode 100644 index 000000000..3587ad07e --- /dev/null +++ b/src/main/java/io/appium/java_client/android/geolocation/SupportsExtendedGeolocationCommands.java @@ -0,0 +1,40 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * See the NOTICE file distributed with this work for additional + * information regarding copyright ownership. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.appium.java_client.android.geolocation; + +import com.google.common.collect.ImmutableMap; +import io.appium.java_client.CommandExecutionHelper; +import io.appium.java_client.ExecutesMethod; +import org.openqa.selenium.remote.DriverCommand; + +import java.util.AbstractMap; + +public interface SupportsExtendedGeolocationCommands extends ExecutesMethod { + + /** + * Allows to set geo location with extended parameters + * available for Android platform. + * + * @param location The location object to set. + */ + default void setLocation(AndroidGeoLocation location) { + ImmutableMap parameters = ImmutableMap + .of("location", location.build()); + CommandExecutionHelper.execute(this, + new AbstractMap.SimpleEntry<>(DriverCommand.SET_LOCATION, parameters)); + } +} From 7ba73a98b57f5cf6f1d3c76c60acd47246588416 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jul 2021 18:18:03 +0300 Subject: [PATCH 015/582] build(deps): bump commons-io from 2.10.0 to 2.11.0 (#1494) Bumps commons-io from 2.10.0 to 2.11.0. --- updated-dependencies: - dependency-name: commons-io:commons-io dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 948485713..54c32f31a 100644 --- a/build.gradle +++ b/build.gradle @@ -77,7 +77,7 @@ dependencies { implementation 'cglib:cglib:3.3.0' implementation 'commons-validator:commons-validator:1.7' implementation 'org.apache.commons:commons-lang3:3.12.0' - implementation 'commons-io:commons-io:2.10.0' + implementation 'commons-io:commons-io:2.11.0' implementation 'org.springframework:spring-context:5.3.8' implementation 'org.aspectj:aspectjweaver:1.9.7' implementation 'org.slf4j:slf4j-api:1.7.31' From cfeaf498c66a4f4c38d98bf52c63571471aa3e23 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jul 2021 23:26:24 +0530 Subject: [PATCH 016/582] build(deps): bump spring-context from 5.3.8 to 5.3.9 (#1495) Bumps [spring-context](https://github.com/spring-projects/spring-framework) from 5.3.8 to 5.3.9. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.8...v5.3.9) --- updated-dependencies: - dependency-name: org.springframework:spring-context dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 54c32f31a..c6488b4e5 100644 --- a/build.gradle +++ b/build.gradle @@ -78,7 +78,7 @@ dependencies { implementation 'commons-validator:commons-validator:1.7' implementation 'org.apache.commons:commons-lang3:3.12.0' implementation 'commons-io:commons-io:2.11.0' - implementation 'org.springframework:spring-context:5.3.8' + implementation 'org.springframework:spring-context:5.3.9' implementation 'org.aspectj:aspectjweaver:1.9.7' implementation 'org.slf4j:slf4j-api:1.7.31' From 9316538cec86c82e9444f9f90e2fc39cd4cac215 Mon Sep 17 00:00:00 2001 From: Valery Yatsynovich Date: Tue, 20 Jul 2021 15:29:42 +0300 Subject: [PATCH 017/582] chore: Upgrade to Gradle 7.1.1 (#1497) --- build.gradle | 4 ++-- gradle/wrapper/gradle-wrapper.jar | Bin 59203 -> 59536 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index c6488b4e5..5afdc2207 100644 --- a/build.gradle +++ b/build.gradle @@ -107,7 +107,7 @@ tasks.withType(JacocoReport) { description = 'Generate Jacoco coverage reports after running tests' sourceSets sourceSets.main reports { - html.enabled true + html.required = true html.destination file("${buildDir}/Reports/jacoco") } } @@ -195,7 +195,7 @@ signing { } wrapper { - gradleVersion = '6.7.1' + gradleVersion = '7.1.1' distributionType = Wrapper.DistributionType.ALL } diff --git a/gradle/wrapper/gradle-wr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zhI7N-$f$ra3=RjPmMh?-IEkJYQ<}R9Z!}wmp$#~Uc%u1oh#TP}wF*kJJmQX2#27kL z_dz(yKufo<=m71bZfLp^Ll#t3(IHkrgMcvx@~om%Ib(h(<$Da7urTI`x|%`wD--sN zJEEa>4DGSEG?0ulkosfj8IMNN4)B=ZtvGG{|4Fp=Xhg!wPNgYzS>{Bp%%Qa+624X@ X49Luk)baa85H9$5YCsTPT`SVRWMtMW diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1f3fdbc52..af7be50b1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 4f906e0c8..744e882ed 100755 --- a/gradlew +++ b/gradlew @@ -72,7 +72,7 @@ case "`uname`" in Darwin* ) darwin=true ;; - MINGW* ) + MSYS* | MINGW* ) msys=true ;; NONSTOP* ) From c185583e8f5d99a356c0574b09af47836b5d8dde Mon Sep 17 00:00:00 2001 From: Valery Yatsynovich Date: Tue, 20 Jul 2021 15:31:17 +0300 Subject: [PATCH 018/582] chore: Prevent duplicate builds for PRs from base repo branches (#1496) --- .github/workflows/gradle-wrapper-validation.yml | 9 ++++++++- .github/workflows/gradle.yml | 8 +++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index 405a2b306..ba5a2db79 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -1,5 +1,12 @@ name: "Validate Gradle Wrapper" -on: [push, pull_request] + +on: + push: + branches: + - master + pull_request: + branches: + - master jobs: validation: diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 04241b76f..44e24a9e0 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,6 +1,12 @@ name: Appium Java Client CI -on: [push, pull_request] +on: + push: + branches: + - master + pull_request: + branches: + - master jobs: build: From 94d5c0050fe3e225549fa5c00ee0fbbb55c1ab5f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 15:58:40 +0300 Subject: [PATCH 019/582] build(deps): bump gson from 2.8.7 to 2.8.8 (#1507) Bumps [gson](https://github.com/google/gson) from 2.8.7 to 2.8.8. - [Release notes](https://github.com/google/gson/releases) - [Changelog](https://github.com/google/gson/blob/master/CHANGELOG.md) - [Commits](https://github.com/google/gson/compare/gson-parent-2.8.7...gson-parent-2.8.8) --- updated-dependencies: - dependency-name: com.google.code.gson:gson dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5afdc2207..a448344ec 100644 --- a/build.gradle +++ b/build.gradle @@ -72,7 +72,7 @@ dependencies { strictly "${project.property('selenium.version')}" } } - implementation 'com.google.code.gson:gson:2.8.7' + implementation 'com.google.code.gson:gson:2.8.8' implementation 'org.apache.httpcomponents:httpclient:4.5.13' implementation 'cglib:cglib:3.3.0' implementation 'commons-validator:commons-validator:1.7' From 227581b197f195ce38c3fbbc6c886936097414b1 Mon Sep 17 00:00:00 2001 From: Valery Yatsynovich Date: Mon, 23 Aug 2021 18:27:01 +0300 Subject: [PATCH 020/582] chore: Enable Dependabot for GitHub actions (#1500) --- .github/dependabot.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index bcf259eb9..c082a4d00 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,3 +6,9 @@ updates: interval: weekly time: "11:00" open-pull-requests-limit: 10 +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: weekly + time: "11:00" + open-pull-requests-limit: 10 From 3a3e2f9f8088247667289353068b9ded9c34cbc8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Aug 2021 16:35:29 +0300 Subject: [PATCH 021/582] build(deps): bump slf4j-api from 1.7.31 to 1.7.32 (#1501) Bumps [slf4j-api](https://github.com/qos-ch/slf4j) from 1.7.31 to 1.7.32. - [Release notes](https://github.com/qos-ch/slf4j/releases) - [Commits](https://github.com/qos-ch/slf4j/commits) --- updated-dependencies: - dependency-name: org.slf4j:slf4j-api dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index a448344ec..d827cd41d 100644 --- a/build.gradle +++ b/build.gradle @@ -80,7 +80,7 @@ dependencies { implementation 'commons-io:commons-io:2.11.0' implementation 'org.springframework:spring-context:5.3.9' implementation 'org.aspectj:aspectjweaver:1.9.7' - implementation 'org.slf4j:slf4j-api:1.7.31' + implementation 'org.slf4j:slf4j-api:1.7.32' testImplementation 'junit:junit:4.13.2' testImplementation 'org.hamcrest:hamcrest:2.2' From bcd6881efe53713ea339a3e606dc0bc004969908 Mon Sep 17 00:00:00 2001 From: Srinivasan Sekar Date: Mon, 30 Aug 2021 11:09:42 +0530 Subject: [PATCH 022/582] feat: allow to add custom command dynamically (#1506) --- .../io/appium/java_client/AppiumDriver.java | 29 +++++++++++++++++-- .../remote/AppiumCommandExecutor.java | 3 ++ .../io/appium/java_client/ios/AppIOSTest.java | 2 +- .../appium/java_client/ios/BaseIOSTest.java | 4 +-- .../appium/java_client/ios/IOSDriverTest.java | 29 ++++++++++++++++++- 5 files changed, 61 insertions(+), 6 deletions(-) diff --git a/src/main/java/io/appium/java_client/AppiumDriver.java b/src/main/java/io/appium/java_client/AppiumDriver.java index 32785d1eb..fd512197a 100644 --- a/src/main/java/io/appium/java_client/AppiumDriver.java +++ b/src/main/java/io/appium/java_client/AppiumDriver.java @@ -29,7 +29,6 @@ import io.appium.java_client.remote.MobileCapabilityType; import io.appium.java_client.service.local.AppiumDriverLocalService; import io.appium.java_client.service.local.AppiumServiceBuilder; - import org.openqa.selenium.By; import org.openqa.selenium.Capabilities; import org.openqa.selenium.DeviceRotation; @@ -39,7 +38,6 @@ import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; import org.openqa.selenium.html5.Location; - import org.openqa.selenium.remote.CapabilityType; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.DriverCommand; @@ -49,8 +47,10 @@ import org.openqa.selenium.remote.Response; import org.openqa.selenium.remote.html5.RemoteLocationContext; import org.openqa.selenium.remote.http.HttpClient; +import org.openqa.selenium.remote.http.HttpMethod; import java.net.URL; +import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; @@ -288,6 +288,31 @@ public void rotate(ScreenOrientation orientation) { ImmutableMap.of("orientation", orientation.value().toUpperCase())); } + /** + * This method is used to add custom appium commands in Appium 2.0. + * + * @param httpMethod the available {@link HttpMethod}. + * @param url The url to URL template as https://www.w3.org/TR/webdriver/#endpoints. + * @param methodName The name of custom appium command. + */ + public void addCommand(HttpMethod httpMethod, String url, String methodName) { + switch (httpMethod) { + case GET: + MobileCommand.commandRepository.put(methodName, MobileCommand.getC(url)); + break; + case POST: + MobileCommand.commandRepository.put(methodName, MobileCommand.postC(url)); + break; + case DELETE: + MobileCommand.commandRepository.put(methodName, MobileCommand.deleteC(url)); + break; + default: + throw new WebDriverException(String.format("Unsupported HTTP Method: %s. Only %s methods are supported", + httpMethod, + Arrays.toString(HttpMethod.values()))); + } + } + @Override public ScreenOrientation getOrientation() { Response response = execute(DriverCommand.GET_SCREEN_ORIENTATION); diff --git a/src/main/java/io/appium/java_client/remote/AppiumCommandExecutor.java b/src/main/java/io/appium/java_client/remote/AppiumCommandExecutor.java index ea0ade5f0..2b0f77f7e 100644 --- a/src/main/java/io/appium/java_client/remote/AppiumCommandExecutor.java +++ b/src/main/java/io/appium/java_client/remote/AppiumCommandExecutor.java @@ -241,6 +241,9 @@ public Response execute(Command command) throws WebDriverException { } }); } + if (getAdditionalCommands().containsKey(command.getName())) { + super.defineCommand(command.getName(), getAdditionalCommands().get(command.getName())); + } Response response; try { diff --git a/src/test/java/io/appium/java_client/ios/AppIOSTest.java b/src/test/java/io/appium/java_client/ios/AppIOSTest.java index 12426ebd9..bdc75a01b 100644 --- a/src/test/java/io/appium/java_client/ios/AppIOSTest.java +++ b/src/test/java/io/appium/java_client/ios/AppIOSTest.java @@ -39,4 +39,4 @@ public static void beforeClass() throws Exception { driver = new IOSDriver<>(new URL("http://" + ip + ":" + PORT + "/wd/hub"), capabilities); } } -} +} \ No newline at end of file diff --git a/src/test/java/io/appium/java_client/ios/BaseIOSTest.java b/src/test/java/io/appium/java_client/ios/BaseIOSTest.java index 45e7a8e2e..9275dd10b 100644 --- a/src/test/java/io/appium/java_client/ios/BaseIOSTest.java +++ b/src/test/java/io/appium/java_client/ios/BaseIOSTest.java @@ -31,9 +31,9 @@ public class BaseIOSTest { protected static IOSDriver driver; protected static final int PORT = 4723; public static final String DEVICE_NAME = System.getenv("IOS_DEVICE_NAME") != null - ? System.getenv("IOS_DEVICE_NAME") : "iPhone X"; + ? System.getenv("IOS_DEVICE_NAME") : "iPhone 12"; public static final String PLATFORM_VERSION = System.getenv("IOS_PLATFORM_VERSION") != null - ? System.getenv("IOS_PLATFORM_VERSION") : "11.4"; + ? System.getenv("IOS_PLATFORM_VERSION") : "14.5"; /** diff --git a/src/test/java/io/appium/java_client/ios/IOSDriverTest.java b/src/test/java/io/appium/java_client/ios/IOSDriverTest.java index 40ecb5a9b..a1d7a0fb3 100644 --- a/src/test/java/io/appium/java_client/ios/IOSDriverTest.java +++ b/src/test/java/io/appium/java_client/ios/IOSDriverTest.java @@ -22,18 +22,21 @@ import static org.hamcrest.Matchers.greaterThan; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import com.google.common.collect.ImmutableMap; import io.appium.java_client.MobileElement; import io.appium.java_client.appmanagement.ApplicationState; import io.appium.java_client.remote.HideKeyboardStrategy; import org.junit.Ignore; import org.junit.Test; - import org.openqa.selenium.By; import org.openqa.selenium.ScreenOrientation; import org.openqa.selenium.html5.Location; +import org.openqa.selenium.remote.Response; +import org.openqa.selenium.remote.http.HttpMethod; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; @@ -41,6 +44,30 @@ public class IOSDriverTest extends AppIOSTest { + @Test + public void addCustomCommandTest() { + driver.addCommand(HttpMethod.GET, "/sessions", "getSessions"); + final Response getSessions = driver.execute("getSessions"); + assertNotNull(getSessions.getSessionId()); + } + + @Test + public void addCustomCommandWithSessionIdTest() { + driver.addCommand(HttpMethod.POST, "/session/" + driver.getSessionId() + "/appium/app/launch", "launchApplication"); + final Response launchApplication = driver.execute("launchApplication"); + assertNotNull(launchApplication.getSessionId()); + } + + @Test + public void addCustomCommandWithElementIdTest() { + IOSElement intA = driver.findElementById("IntegerA"); + intA.clear(); + driver.addCommand(HttpMethod.POST, + String.format("/session/%s/appium/element/%s/value", driver.getSessionId(), intA.getId()), "setNewValue"); + final Response setNewValue = driver.execute("setNewValue", ImmutableMap.of("id", intA.getId(), "value", "8")); + assertNotNull(setNewValue.getSessionId()); + } + @Test public void getDeviceTimeTest() { String time = driver.getDeviceTime(); From 94b30221fb602b7a62c33d26a168d95ff77a4d2a Mon Sep 17 00:00:00 2001 From: Manoj Kumar Date: Fri, 3 Sep 2021 17:57:05 +0530 Subject: [PATCH 023/582] feat: Add new flags to support Appium 2.0 (#1511) --- .../local/flags/GeneralServerFlag.java | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/appium/java_client/service/local/flags/GeneralServerFlag.java b/src/main/java/io/appium/java_client/service/local/flags/GeneralServerFlag.java index d59ff750d..817deae05 100644 --- a/src/main/java/io/appium/java_client/service/local/flags/GeneralServerFlag.java +++ b/src/main/java/io/appium/java_client/service/local/flags/GeneralServerFlag.java @@ -133,7 +133,40 @@ public enum GeneralServerFlag implements ServerArgument { * Default: [] * Sample: --deny-insecure=foo,bar */ - DENY_INSECURE("--deny-insecure"); + DENY_INSECURE("--deny-insecure"), + /** + * Plugins are little programs which can be added to an Appium installation and activated, for the purpose of + * extending or modifying the behavior of pretty much any aspect of Appium. + * Plugins are available with Appium as of Appium 2.0. + * To activate all plugins, you can use the single string "all" as the value (e.g --plugins=all) + * Default: [] + * Sample: --plugins=device-farm,images + */ + PLUGINS("--plugins"), + /** + * A comma-separated list of installed driver names that should be active for this server. + * All drivers will be active by default. + * Default: [] + * Sample: --drivers=uiautomator2,xcuitest + */ + DRIVERS("--drivers"), + /** + * Base path to use as the prefix for all webdriver routes running on this server. + * Sample: --base-path=/wd/hub + */ + BASEPATH("--base-path"), + /** + * Set the default desired client arguments for a plugin. + * Default: [] + * Sample: [ '{"images":{"foo1": "bar1", "foo2": "bar2"}}' | /path/to/pluginArgs.json ] + */ + PLUGINARGS("--plugin-args"), + /** + * Set the default desired client arguments for a driver. + * Default: [] + * Sample: [ '{"xcuitest": {"foo1": "bar1", "foo2": "bar2"}}' | /path/to/driverArgs.json ] + */ + DRIVERARGS("--driver-args"); private final String arg; From 93a125e5d57f51c94c50954242d2119b5e5885bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Sep 2021 14:34:09 +0300 Subject: [PATCH 024/582] build(deps): bump actions/setup-java from 1 to 2.3.0 (#1508) * build(deps): bump actions/setup-java from 1 to 2.3.0 Bumps [actions/setup-java](https://github.com/actions/setup-java) from 1 to 2.3.0. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v1...v2.3.0) --- updated-dependencies: - dependency-name: actions/setup-java dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * Use Zulu distribution of OpenJDK https://github.com/actions/setup-java/blob/main/docs/switching-to-v2.md: > Use the `zulu` keyword if you would like to continue using the same distribution as in V1. * Fix JDK version: 1.8 -> 8 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Valery Yatsynovich --- .github/workflows/gradle.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 44e24a9e0..dbd99a5ee 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -15,9 +15,10 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + - name: Set up JDK 8 + uses: actions/setup-java@v2.3.0 with: - java-version: 1.8 + distribution: 'zulu' + java-version: 8 - name: Build with Gradle run: ./gradlew clean build -x signMavenJavaPublication -x test -x checkstyleTest From f8df435a9d09782d091b124c4eab07049adae0fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Sep 2021 16:48:08 +0300 Subject: [PATCH 025/582] build(deps): bump webdrivermanager from 4.4.3 to 5.0.1 (#1512) Bumps [webdrivermanager](https://github.com/bonigarcia/webdrivermanager) from 4.4.3 to 5.0.1. - [Release notes](https://github.com/bonigarcia/webdrivermanager/releases) - [Changelog](https://github.com/bonigarcia/webdrivermanager/blob/master/CHANGELOG.md) - [Commits](https://github.com/bonigarcia/webdrivermanager/compare/webdrivermanager-4.4.3...webdrivermanager-5.0.1) --- updated-dependencies: - dependency-name: io.github.bonigarcia:webdrivermanager dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d827cd41d..9df08d75a 100644 --- a/build.gradle +++ b/build.gradle @@ -84,7 +84,7 @@ dependencies { testImplementation 'junit:junit:4.13.2' testImplementation 'org.hamcrest:hamcrest:2.2' - testImplementation (group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '4.4.3') { + testImplementation (group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '5.0.1') { exclude group: 'org.seleniumhq.selenium' } } From 4397523c50c99e5857ccc30e33cc85d1c0ef726b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Sep 2021 16:48:30 +0300 Subject: [PATCH 026/582] build(deps): bump org.owasp.dependencycheck from 6.2.0 to 6.3.1 (#1513) Bumps org.owasp.dependencycheck from 6.2.0 to 6.3.1. --- updated-dependencies: - dependency-name: org.owasp.dependencycheck dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 9df08d75a..ce186c9be 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { id 'jacoco' id 'checkstyle' id 'signing' - id 'org.owasp.dependencycheck' version '6.2.0' + id 'org.owasp.dependencycheck' version '6.3.1' id 'com.github.johnrengelman.shadow' version '6.1.0' } From 8bec046c903c7e4947d6467e59f8f6016b2cdc04 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Sep 2021 11:27:21 +0300 Subject: [PATCH 027/582] build(deps): bump com.github.johnrengelman.shadow from 6.1.0 to 7.0.0 (#1468) Bumps com.github.johnrengelman.shadow from 6.1.0 to 7.0.0. Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index ce186c9be..991176d72 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ plugins { id 'checkstyle' id 'signing' id 'org.owasp.dependencycheck' version '6.3.1' - id 'com.github.johnrengelman.shadow' version '6.1.0' + id 'com.github.johnrengelman.shadow' version '7.0.0' } repositories { From 973a684809b8dbfe514abfa0d81db6dffc54096a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Sep 2021 16:34:23 +0300 Subject: [PATCH 028/582] build(deps): bump webdrivermanager from 5.0.1 to 5.0.2 (#1514) Bumps [webdrivermanager](https://github.com/bonigarcia/webdrivermanager) from 5.0.1 to 5.0.2. - [Release notes](https://github.com/bonigarcia/webdrivermanager/releases) - [Changelog](https://github.com/bonigarcia/webdrivermanager/blob/master/CHANGELOG.md) - [Commits](https://github.com/bonigarcia/webdrivermanager/compare/webdrivermanager-5.0.1...webdrivermanager-5.0.2) --- updated-dependencies: - dependency-name: io.github.bonigarcia:webdrivermanager dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 991176d72..67b47b56f 100644 --- a/build.gradle +++ b/build.gradle @@ -84,7 +84,7 @@ dependencies { testImplementation 'junit:junit:4.13.2' testImplementation 'org.hamcrest:hamcrest:2.2' - testImplementation (group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '5.0.1') { + testImplementation (group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '5.0.2') { exclude group: 'org.seleniumhq.selenium' } } From 381368c14f0d188926bc12f983af27370a917403 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 21:32:27 +0530 Subject: [PATCH 029/582] build(deps): bump spring-context from 5.3.9 to 5.3.10 (#1517) Bumps [spring-context](https://github.com/spring-projects/spring-framework) from 5.3.9 to 5.3.10. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.9...v5.3.10) --- updated-dependencies: - dependency-name: org.springframework:spring-context dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 67b47b56f..6213e2798 100644 --- a/build.gradle +++ b/build.gradle @@ -78,7 +78,7 @@ dependencies { implementation 'commons-validator:commons-validator:1.7' implementation 'org.apache.commons:commons-lang3:3.12.0' implementation 'commons-io:commons-io:2.11.0' - implementation 'org.springframework:spring-context:5.3.9' + implementation 'org.springframework:spring-context:5.3.10' implementation 'org.aspectj:aspectjweaver:1.9.7' implementation 'org.slf4j:slf4j-api:1.7.32' From 2f4062adddc9233471a21d5c8a87e508112405b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Sep 2021 21:32:51 +0530 Subject: [PATCH 030/582] build(deps): bump webdrivermanager from 5.0.2 to 5.0.3 (#1516) Bumps [webdrivermanager](https://github.com/bonigarcia/webdrivermanager) from 5.0.2 to 5.0.3. - [Release notes](https://github.com/bonigarcia/webdrivermanager/releases) - [Changelog](https://github.com/bonigarcia/webdrivermanager/blob/master/CHANGELOG.md) - [Commits](https://github.com/bonigarcia/webdrivermanager/compare/webdrivermanager-5.0.2...webdrivermanager-5.0.3) --- updated-dependencies: - dependency-name: io.github.bonigarcia:webdrivermanager dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 6213e2798..e5e16a6f9 100644 --- a/build.gradle +++ b/build.gradle @@ -84,7 +84,7 @@ dependencies { testImplementation 'junit:junit:4.13.2' testImplementation 'org.hamcrest:hamcrest:2.2' - testImplementation (group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '5.0.2') { + testImplementation (group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '5.0.3') { exclude group: 'org.seleniumhq.selenium' } } From f7c08a2fb591f8fc58d6ffab11d9b046435f985a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 14:53:55 +0300 Subject: [PATCH 031/582] build(deps): bump org.owasp.dependencycheck from 6.3.1 to 6.3.2 (#1523) Bumps org.owasp.dependencycheck from 6.3.1 to 6.3.2. --- updated-dependencies: - dependency-name: org.owasp.dependencycheck dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e5e16a6f9..e2558dd3e 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { id 'jacoco' id 'checkstyle' id 'signing' - id 'org.owasp.dependencycheck' version '6.3.1' + id 'org.owasp.dependencycheck' version '6.3.2' id 'com.github.johnrengelman.shadow' version '7.0.0' } From c7d01e749b891dad5958aa87580033d1ad3df65d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Oct 2021 15:50:06 +0300 Subject: [PATCH 032/582] build(deps): bump actions/setup-java from 2.3.0 to 2.3.1 (#1524) Bumps [actions/setup-java](https://github.com/actions/setup-java) from 2.3.0 to 2.3.1. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v2.3.0...v2.3.1) --- updated-dependencies: - dependency-name: actions/setup-java dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index dbd99a5ee..ce066fb6f 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Set up JDK 8 - uses: actions/setup-java@v2.3.0 + uses: actions/setup-java@v2.3.1 with: distribution: 'zulu' java-version: 8 From 3466797b6627b8a1924198f4be8e95decf6db94c Mon Sep 17 00:00:00 2001 From: dr29bart Date: Thu, 7 Oct 2021 00:08:51 -0500 Subject: [PATCH 033/582] =?UTF-8?q?fix:=20[android]=20AndroidGeoLocation:?= =?UTF-8?q?=20update=20the=20constructor=20signature=20to=20mim=E2=80=A6?= =?UTF-8?q?=20(#1526)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java_client/android/geolocation/AndroidGeoLocation.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/appium/java_client/android/geolocation/AndroidGeoLocation.java b/src/main/java/io/appium/java_client/android/geolocation/AndroidGeoLocation.java index 9ab204317..f04a41fe2 100644 --- a/src/main/java/io/appium/java_client/android/geolocation/AndroidGeoLocation.java +++ b/src/main/java/io/appium/java_client/android/geolocation/AndroidGeoLocation.java @@ -39,10 +39,10 @@ public AndroidGeoLocation() { /** * Initializes AndroidLocation instance with longitude and latitude values. * - * @param longitude longitude value * @param latitude latitude value + * @param longitude longitude value */ - public AndroidGeoLocation(double longitude, double latitude) { + public AndroidGeoLocation(double latitude, double longitude) { this.longitude = longitude; this.latitude = latitude; } From 1d15347a66f1b8922e8528c9fd46907f388a055d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Oct 2021 15:15:09 +0300 Subject: [PATCH 034/582] build(deps): bump lombok from 1.18.20 to 1.18.22 (#1527) Bumps [lombok](https://github.com/projectlombok/lombok) from 1.18.20 to 1.18.22. - [Release notes](https://github.com/projectlombok/lombok/releases) - [Changelog](https://github.com/projectlombok/lombok/blob/master/doc/changelog.markdown) - [Commits](https://github.com/projectlombok/lombok/compare/v1.18.20...v1.18.22) --- updated-dependencies: - dependency-name: org.projectlombok:lombok dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index e2558dd3e..d7e398b19 100644 --- a/build.gradle +++ b/build.gradle @@ -23,7 +23,7 @@ configurations { dependencies { ecj 'org.eclipse.jdt:ecj:3.26.0' - lombok 'org.projectlombok:lombok:1.18.20' + lombok 'org.projectlombok:lombok:1.18.22' } java { @@ -50,7 +50,7 @@ compileJava { } dependencies { - compileOnly('org.projectlombok:lombok:1.18.16') + compileOnly('org.projectlombok:lombok:1.18.22') annotationProcessor('org.projectlombok:lombok:1.18.20') api ("org.seleniumhq.selenium:selenium-java") { version { From f951fe8676fac4a77370bcc58f25cdb1c8fd89a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Oct 2021 15:23:51 +0300 Subject: [PATCH 035/582] build(deps): bump com.github.johnrengelman.shadow from 7.0.0 to 7.1.0 (#1528) Bumps com.github.johnrengelman.shadow from 7.0.0 to 7.1.0. --- updated-dependencies: - dependency-name: com.github.johnrengelman.shadow dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d7e398b19..c57bdfab5 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ plugins { id 'checkstyle' id 'signing' id 'org.owasp.dependencycheck' version '6.3.2' - id 'com.github.johnrengelman.shadow' version '7.0.0' + id 'com.github.johnrengelman.shadow' version '7.1.0' } repositories { From f2e8f93fd613d6570e8ce515d4a85a70e9872305 Mon Sep 17 00:00:00 2001 From: Srinivasan Sekar Date: Mon, 11 Oct 2021 19:26:23 +0530 Subject: [PATCH 036/582] Release 7.6.0 and update release notes --- README.md | 25 +++++++++++++++++++++++++ build.gradle | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bfcc35e51..f7d6b0c69 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,31 @@ dependencies { ``` ## Changelog +*7.6.0* +- **[ENHANCEMENTS]** + - Add custom commands dynamically [Appium 2.0]. [#1506](https://github.com/appium/java-client/pull/1506) + - New General Server flags are added [Appium 2.0]. [#1511](https://github.com/appium/java-client/pull/1511) + - Add support of extended Android geolocation. [#1492](https://github.com/appium/java-client/pull/1492) +- **[BUG FIX]** + - AndroidGeoLocation: update the constructor signature to mimic order of parameters in `org.openqa.selenium.html5.Location`. [#1526](https://github.com/appium/java-client/pull/1526) + - Prevent duplicate builds for PRs from base repo branches. [#1496](https://github.com/appium/java-client/pull/1496) + - Enable Dependabot for GitHub actions. [#1500](https://github.com/appium/java-client/pull/1500) + - bind mac2element in element map for mac platform. [#1474](https://github.com/appium/java-client/pull/1474) +- **[DEPENDENCY UPDATES]** + - `org.owasp.dependencycheck` was updated to 6.3.2. + - `org.projectlombok:lombok` was updated to 1.18.22. + - `com.github.johnrengelman.shadow` was updated to 7.1.0. + - `actions/setup-java` was updated to 2.3.1. + - `io.github.bonigarcia:webdrivermanager` was updated to 5.0.3. + - `org.springframework:spring-context` was updated to 5.3.10. + - `org.slf4j:slf4j-api` was updated to 1.7.32. + - `com.google.code.gson:gson` was updated to 2.8.8. + - `gradle` was updated to 7.1.1. + - `commons-io:commons-io` was updated to 2.11.0. + - `org.aspectj:aspectjweaver` was updated to 1.9.7. + - `org.eclipse.jdt:ecj` was updated to 3.26.0. + - `'junit:junit` was updated to 4.13.2. + *7.5.1* - **[ENHANCEMENTS]** - Add iOS related annotations to tvOS. [#1456](https://github.com/appium/java-client/pull/1456) diff --git a/build.gradle b/build.gradle index c57bdfab5..356beb536 100644 --- a/build.gradle +++ b/build.gradle @@ -130,7 +130,7 @@ publishing { mavenJava(MavenPublication) { groupId = 'io.appium' artifactId = 'java-client' - version = '7.5.1' + version = '7.6.0' from components.java pom { name = 'java-client' From 8057ac63abe8a6c8408c6a4f9fb3149c90a4ffc5 Mon Sep 17 00:00:00 2001 From: Valery Yatsynovich Date: Thu, 21 Oct 2021 05:19:34 +0300 Subject: [PATCH 037/582] refactor!: Migrate to Selenium 4 (#1531) * refactor!: migrate to Selenium 4 BREAKING CHANGE: - interface `io.appium.java_client.MobileDriver` do not extend `org.openqa.selenium.internal.FindsByClassName`, `org.openqa.selenium.internal.FindsByCssSelector`, `org.openqa.selenium.internal.FindsById`, `org.openqa.selenium.internal.FindsByLinkText`, `org.openqa.selenium.internal.FindsByName`, `org.openqa.selenium.internal.FindsByTagName`, `org.openqa.selenium.internal.FindsByXPath` interfaces anymore because they were removed in Selenium Java client; - class `io.appium.java_client.DefaultGenericMobileElement` do not implement `org.openqa.selenium.internal.FindsByClassName`, `org.openqa.selenium.internal.FindsByCssSelector`, `org.openqa.selenium.internal.FindsById`, `org.openqa.selenium.internal.FindsByLinkText`, `org.openqa.selenium.internal.FindsByName`, `org.openqa.selenium.internal.FindsByTagName`, `org.openqa.selenium.internal.FindsByXPath` interfaces anymore because they were removed in Selenium Java client; - method `String io.appium.java_client.remote.MobileOptions#getPlatformName()` is removed in favor of `Platform org.openqa.selenium.Capabilities#getPlatformName()` - method `io.appium.java_client.service.local.AppiumServiceBuilder#withStartUpTimeOut` is removed in favor of `org.openqa.selenium.remote.service.DriverService.Builder#withTimeout` * refactor!: drop Appium FindsBy* iterfaces BREAKING CHANGE: - drop Appium `FindsBy*` iterfaces in the same way it was done in Selenium java client. The removed intefraces are: `io.appium.java_client.FindsByAccessibilityId`, `io.appium.java_client.FindsByAndroidDataMatcher`, `io.appium.java_client.FindsByAndroidUIAutomator`, `io.appium.java_client.FindsByAndroidViewMatcher`, `io.appium.java_client.FindsByAndroidViewTag`, `io.appium.java_client.FindsByCustom`, `io.appium.java_client.FindsByFluentSelector`, `io.appium.java_client.FindsByImage`, `io.appium.java_client.FindsByIosClassChain`, `io.appium.java_client.FindsByIosNSPredicate`, `io.appium.java_client.FindsByWindowsAutomation`, `io.appium.java_client.mac.FindsByClassChain`, `io.appium.java_client.mac.FindsByNsPredicate` - remove methods `findElements(String by, String using)` and `findElement(String by, String using)` from `io.appium.java_client.DefaultGenericMobileDriver` and `io.appium.java_client.DefaultGenericMobileElement` because the originals of these methods are deprecated in Selenium `RemoteWebDriver` and `RemoteWebElement` and throw `UnsupportedOperationException` - remove `io.appium.java_client.MobileSelector` as it's used once, the string values from the enum are inlined in `io.appium.java_client.MobileBy.java` * fix: introduce MobileBy.className The change made in Selenium 4 (https://github.com/SeleniumHQ/selenium/commit/0aaa401fde5f4a5ecf2d2a2325221307b9bb3e89#r58091435) broke Appium `class name` selector strategy. The workaround was implemented: `MobileBy#className`. * refactor!: drop deprecated method `AppiumDriver#substituteMobilePlatform` BREAKING CHANGE: drop deprecated method `io.appium.java_client.AppiumDriver#substituteMobilePlatform` --- gradle.properties | 2 +- .../io/appium/java_client/AppiumDriver.java | 63 +- .../DefaultGenericMobileDriver.java | 103 ---- .../DefaultGenericMobileElement.java | 132 +---- .../java_client/DriverMobileCommand.java | 27 - .../java_client/FindsByAccessibilityId.java | 52 -- .../FindsByAndroidDataMatcher.java | 32 - .../FindsByAndroidUIAutomator.java | 53 -- .../FindsByAndroidViewMatcher.java | 32 - .../java_client/FindsByAndroidViewTag.java | 52 -- .../io/appium/java_client/FindsByCustom.java | 55 -- .../java_client/FindsByFluentSelector.java | 51 -- .../io/appium/java_client/FindsByImage.java | 63 -- .../java_client/FindsByIosClassChain.java | 32 - .../java_client/FindsByIosNSPredicate.java | 32 - .../java_client/FindsByWindowsAutomation.java | 50 -- .../IllegalCoordinatesException.java | 28 - .../java/io/appium/java_client/MobileBy.java | 559 ++---------------- .../io/appium/java_client/MobileDriver.java | 43 +- .../io/appium/java_client/MobileElement.java | 42 -- .../io/appium/java_client/MobileSelector.java | 41 -- .../appium/java_client/android/Activity.java | 1 - .../java_client/android/AndroidDriver.java | 15 +- .../java_client/android/AndroidElement.java | 8 +- .../java_client/android/AndroidOptions.java | 10 +- .../java_client/events/DefaultAspect.java | 13 - .../JsonToMobileElementConverter.java | 2 +- .../io/appium/java_client/ios/IOSDriver.java | 7 +- .../io/appium/java_client/ios/IOSElement.java | 5 +- .../io/appium/java_client/ios/IOSOptions.java | 10 +- .../java_client/mac/FindsByClassChain.java | 50 -- .../java_client/mac/FindsByNsPredicate.java | 50 -- .../io/appium/java_client/mac/Mac2Driver.java | 4 +- .../appium/java_client/mac/Mac2Element.java | 3 +- .../pagefactory/bys/builder/Strategies.java | 2 +- .../remote/AppiumCommandExecutor.java | 19 +- .../remote/AppiumW3CHttpCommandCodec.java | 2 +- .../java_client/remote/MobileOptions.java | 13 +- .../local/AppiumDriverLocalService.java | 26 +- .../service/local/AppiumServiceBuilder.java | 34 +- .../touch/offset/ElementOption.java | 8 +- .../java_client/windows/WindowsDriver.java | 4 +- .../java_client/windows/WindowsElement.java | 3 +- .../java_client/ws/StringWebSocketClient.java | 41 +- .../java/org/openqa/selenium/WebDriver.java | 335 +++++++++-- .../java/org/openqa/selenium/WebElement.java | 179 ++++-- .../selenium/internal/FindsByClassName.java | 28 - .../selenium/internal/FindsByCssSelector.java | 28 - .../openqa/selenium/internal/FindsById.java | 28 - .../selenium/internal/FindsByLinkText.java | 32 - .../openqa/selenium/internal/FindsByName.java | 28 - .../selenium/internal/FindsByTagName.java | 28 - .../selenium/internal/FindsByXPath.java | 28 - .../AndroidAbilityToUseSupplierTest.java | 28 +- .../android/AndroidElementTest.java | 16 +- .../android/AndroidOptionsTest.java | 7 +- .../android/AndroidSearchingTest.java | 14 +- .../java_client/android/AndroidTouchTest.java | 41 +- .../java_client/android/FingerPrintTest.java | 13 +- .../java_client/android/IntentTest.java | 3 +- .../java_client/android/UIAutomator2Test.java | 6 +- .../java_client/appium/AndroidTest.java | 16 +- .../ios/IOSElementGenerationTest.java | 8 +- .../AbilityToDefineListenersExternally.java | 16 +- .../java_client/events/BaseListenerTest.java | 82 ++- .../events/DefaultEventListenerTest.java | 19 +- .../java_client/events/EmptyWebDriver.java | 105 +--- .../events/ExtendedEventListenerTest.java | 4 +- .../java_client/events/FewInstancesTest.java | 18 +- .../java_client/events/StubWebElement.java | 97 +-- .../appium/java_client/events/StubWindow.java | 5 + ...bDriverEventListenerCompatibilityTest.java | 11 +- .../appium/java_client/ios/IOSDriverTest.java | 10 +- .../java_client/ios/IOSElementTest.java | 7 +- .../ios/IOSNativeWebTapSettingTest.java | 13 +- .../java_client/ios/IOSOptionsTest.java | 3 +- .../java_client/ios/IOSSearchingTest.java | 16 +- .../appium/java_client/ios/IOSTouchTest.java | 27 +- .../java_client/ios/IOSWebViewTest.java | 10 +- 79 files changed, 756 insertions(+), 2427 deletions(-) delete mode 100644 src/main/java/io/appium/java_client/DriverMobileCommand.java delete mode 100644 src/main/java/io/appium/java_client/FindsByAccessibilityId.java delete mode 100644 src/main/java/io/appium/java_client/FindsByAndroidDataMatcher.java delete mode 100644 src/main/java/io/appium/java_client/FindsByAndroidUIAutomator.java delete mode 100644 src/main/java/io/appium/java_client/FindsByAndroidViewMatcher.java delete mode 100644 src/main/java/io/appium/java_client/FindsByAndroidViewTag.java delete mode 100644 src/main/java/io/appium/java_client/FindsByCustom.java delete mode 100644 src/main/java/io/appium/java_client/FindsByFluentSelector.java delete mode 100644 src/main/java/io/appium/java_client/FindsByImage.java delete mode 100644 src/main/java/io/appium/java_client/FindsByIosClassChain.java delete mode 100644 src/main/java/io/appium/java_client/FindsByIosNSPredicate.java delete mode 100644 src/main/java/io/appium/java_client/FindsByWindowsAutomation.java delete mode 100644 src/main/java/io/appium/java_client/IllegalCoordinatesException.java delete mode 100644 src/main/java/io/appium/java_client/MobileSelector.java delete mode 100644 src/main/java/io/appium/java_client/mac/FindsByClassChain.java delete mode 100644 src/main/java/io/appium/java_client/mac/FindsByNsPredicate.java delete mode 100644 src/main/java/org/openqa/selenium/internal/FindsByClassName.java delete mode 100644 src/main/java/org/openqa/selenium/internal/FindsByCssSelector.java delete mode 100644 src/main/java/org/openqa/selenium/internal/FindsById.java delete mode 100644 src/main/java/org/openqa/selenium/internal/FindsByLinkText.java delete mode 100644 src/main/java/org/openqa/selenium/internal/FindsByName.java delete mode 100644 src/main/java/org/openqa/selenium/internal/FindsByTagName.java delete mode 100644 src/main/java/org/openqa/selenium/internal/FindsByXPath.java diff --git a/gradle.properties b/gradle.properties index 9bd535700..d2d4a6a43 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,4 +7,4 @@ signing.secretKeyRingFile=PathToYourKeyRingFile ossrhUsername=your-jira-id ossrhPassword=your-jira-password -selenium.version=3.141.59 +selenium.version=4.0.0 diff --git a/src/main/java/io/appium/java_client/AppiumDriver.java b/src/main/java/io/appium/java_client/AppiumDriver.java index fd512197a..1e880c569 100644 --- a/src/main/java/io/appium/java_client/AppiumDriver.java +++ b/src/main/java/io/appium/java_client/AppiumDriver.java @@ -68,8 +68,7 @@ */ @SuppressWarnings("unchecked") public class AppiumDriver - extends DefaultGenericMobileDriver implements ComparesImages, FindsByImage, FindsByCustom, - ExecutesDriverScript, LogsEvents, HasSettings { + extends DefaultGenericMobileDriver implements ComparesImages, ExecutesDriverScript, LogsEvents, HasSettings { private static final ErrorHandler errorHandler = new ErrorHandler(new ErrorCodesMobile(), true); // frequently used command parameters @@ -134,23 +133,6 @@ public AppiumDriver(Capabilities desiredCapabilities) { this(AppiumDriverLocalService.buildDefaultService(), desiredCapabilities); } - /** - * Changes platform name and returns new capabilities. - * - * @param originalCapabilities the given {@link Capabilities}. - * @param newPlatform a {@link MobileCapabilityType#PLATFORM_NAME} value which has - * to be set up - * @return {@link Capabilities} with changed mobile platform value - * @deprecated Please use {@link #updateDefaultPlatformName(Capabilities, String)} instead - */ - @Deprecated - protected static Capabilities substituteMobilePlatform(Capabilities originalCapabilities, - String newPlatform) { - DesiredCapabilities dc = new DesiredCapabilities(originalCapabilities); - dc.setCapability(PLATFORM_NAME, newPlatform); - return dc; - } - /** * Changes platform name if it is not set and returns new capabilities. * @@ -174,49 +156,6 @@ public List findElements(By by) { return super.findElements(by); } - @Override - public List findElements(String by, String using) { - return super.findElements(by, using); - } - - @Override - public List findElementsById(String id) { - return super.findElementsById(id); - } - - public List findElementsByLinkText(String using) { - return super.findElementsByLinkText(using); - } - - public List findElementsByPartialLinkText(String using) { - return super.findElementsByPartialLinkText(using); - } - - public List findElementsByTagName(String using) { - return super.findElementsByTagName(using); - } - - public List findElementsByName(String using) { - return super.findElementsByName(using); - } - - public List findElementsByClassName(String using) { - return super.findElementsByClassName(using); - } - - public List findElementsByCssSelector(String using) { - return super.findElementsByCssSelector(using); - } - - public List findElementsByXPath(String using) { - return super.findElementsByXPath(using); - } - - @Override - public List findElementsByAccessibilityId(String using) { - return super.findElementsByAccessibilityId(using); - } - @Override public ExecuteMethod getExecuteMethod() { return executeMethod; diff --git a/src/main/java/io/appium/java_client/DefaultGenericMobileDriver.java b/src/main/java/io/appium/java_client/DefaultGenericMobileDriver.java index 0ca7a1dcc..e6d45f5f8 100644 --- a/src/main/java/io/appium/java_client/DefaultGenericMobileDriver.java +++ b/src/main/java/io/appium/java_client/DefaultGenericMobileDriver.java @@ -20,7 +20,6 @@ import org.openqa.selenium.By; import org.openqa.selenium.Capabilities; -import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.CommandExecutor; import org.openqa.selenium.remote.RemoteWebDriver; @@ -49,112 +48,10 @@ public DefaultGenericMobileDriver(CommandExecutor executor, Capabilities desired return super.findElements(by); } - @Override public List findElements(String by, String using) { - return super.findElements(by, using); - } - @Override public T findElement(By by) { return (T) super.findElement(by); } - @Override public T findElement(String by, String using) { - return (T) super.findElement(by, using); - } - - @Override public List findElementsById(String id) { - return super.findElementsById(id); - } - - @Override public T findElementById(String id) { - return (T) super.findElementById(id); - } - - /** - * Finds a single element by link text. - * - * @throws WebDriverException This method doesn't work against native app UI. - */ - public T findElementByLinkText(String using) throws WebDriverException { - return (T) super.findElementByLinkText(using); - } - - /** - * Finds many elements by link text. - * - * @throws WebDriverException This method doesn't work against native app UI. - */ - public List findElementsByLinkText(String using) throws WebDriverException { - return super.findElementsByLinkText(using); - } - - /** - * Finds a single element by partial link text. - * - * @throws WebDriverException This method doesn't work against native app UI. - */ - public T findElementByPartialLinkText(String using) throws WebDriverException { - return (T) super.findElementByPartialLinkText(using); - } - - /** - * Finds many elements by partial link text. - * - * @throws WebDriverException This method doesn't work against native app UI. - */ - public List findElementsByPartialLinkText(String using) throws WebDriverException { - return super.findElementsByPartialLinkText(using); - } - - public T findElementByTagName(String using) { - return (T) super.findElementByTagName(using); - } - - public List findElementsByTagName(String using) { - return super.findElementsByTagName(using); - } - - public T findElementByName(String using) { - return (T) super.findElementByName(using); - } - - public List findElementsByName(String using) { - return super.findElementsByName(using); - } - - public T findElementByClassName(String using) { - return (T) super.findElementByClassName(using); - } - - public List findElementsByClassName(String using) { - return super.findElementsByClassName(using); - } - - /** - * Finds a single element by CSS selector. - * - * @throws WebDriverException This method doesn't work against native app UI. - */ - public T findElementByCssSelector(String using) throws WebDriverException { - return (T) super.findElementByCssSelector(using); - } - - /** - * Finds many elements by CSS selector. - * - * @throws WebDriverException This method doesn't work against native app UI. - */ - public List findElementsByCssSelector(String using) throws WebDriverException { - return super.findElementsByCssSelector(using); - } - - public T findElementByXPath(String using) { - return (T) super.findElementByXPath(using); - } - - public List findElementsByXPath(String using) { - return super.findElementsByXPath(using); - } - @Override public String toString() { Capabilities capabilities = getCapabilities(); diff --git a/src/main/java/io/appium/java_client/DefaultGenericMobileElement.java b/src/main/java/io/appium/java_client/DefaultGenericMobileElement.java index 2d8154880..6e1bfc64a 100644 --- a/src/main/java/io/appium/java_client/DefaultGenericMobileElement.java +++ b/src/main/java/io/appium/java_client/DefaultGenericMobileElement.java @@ -21,13 +21,6 @@ import org.openqa.selenium.By; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; -import org.openqa.selenium.internal.FindsByClassName; -import org.openqa.selenium.internal.FindsByCssSelector; -import org.openqa.selenium.internal.FindsById; -import org.openqa.selenium.internal.FindsByLinkText; -import org.openqa.selenium.internal.FindsByName; -import org.openqa.selenium.internal.FindsByTagName; -import org.openqa.selenium.internal.FindsByXPath; import org.openqa.selenium.remote.RemoteWebElement; import org.openqa.selenium.remote.Response; @@ -35,11 +28,7 @@ import java.util.Map; @SuppressWarnings({"unchecked", "rawtypes"}) -abstract class DefaultGenericMobileElement extends RemoteWebElement - implements FindsByClassName, - FindsByCssSelector, FindsById, - FindsByLinkText, FindsByName, FindsByTagName, FindsByXPath, FindsByFluentSelector, FindsByAccessibilityId, - ExecutesMethod { +abstract class DefaultGenericMobileElement extends RemoteWebElement implements ExecutesMethod { @Override public Response execute(String driverCommand, Map parameters) { return super.execute(driverCommand, parameters); @@ -53,127 +42,8 @@ abstract class DefaultGenericMobileElement extends RemoteW return super.findElements(by); } - @Override public List findElements(String by, String using) { - return super.findElements(by, using); - } - @Override public T findElement(By by) { return (T) super.findElement(by); } - @Override public T findElement(String by, String using) { - return (T) super.findElement(by, using); - } - - @Override public List findElementsById(String id) { - return super.findElementsById(id); - } - - @Override public T findElementById(String id) { - return (T) super.findElementById(id); - } - - /** - * Finds a single element by link text. - * - * @throws WebDriverException This method doesn't work against native app UI. - */ - public T findElementByLinkText(String using) throws WebDriverException { - return (T) super.findElementByLinkText(using); - } - - /** - * Finds many elements by link text. - * - * @throws WebDriverException This method doesn't work against native app UI. - */ - public List findElementsByLinkText(String using) throws WebDriverException { - return super.findElementsByLinkText(using); - } - - /** - * Finds a single element by partial link text. - * - * @throws WebDriverException This method doesn't work against native app UI. - */ - public T findElementByPartialLinkText(String using) throws WebDriverException { - return (T) super.findElementByPartialLinkText(using); - } - - /** - * Finds many elements by partial link text. - * - * @throws WebDriverException This method doesn't work against native app UI. - */ - public List findElementsByPartialLinkText(String using) throws WebDriverException { - return super.findElementsByPartialLinkText(using); - } - - public T findElementByTagName(String using) { - return (T) super.findElementByTagName(using); - } - - public List findElementsByTagName(String using) { - return super.findElementsByTagName(using); - } - - public T findElementByName(String using) { - return (T) super.findElementByName(using); - } - - public List findElementsByName(String using) { - return super.findElementsByName(using); - } - - public T findElementByClassName(String using) { - return (T) super.findElementByClassName(using); - } - - public List findElementsByClassName(String using) { - return super.findElementsByClassName(using); - } - - /** - * Finds a single element by CSS selector. - * - * @throws WebDriverException This method doesn't work against native app UI. - */ - public T findElementByCssSelector(String using) throws WebDriverException { - return (T) super.findElementByCssSelector(using); - } - - /** - * Finds many elements by CSS selector. - * - * @throws WebDriverException This method doesn't work against native app UI. - */ - public List findElementsByCssSelector(String using) throws WebDriverException { - return super.findElementsByCssSelector(using); - } - - public T findElementByXPath(String using) { - return (T) super.findElementByXPath(using); - } - - public List findElementsByXPath(String using) { - return super.findElementsByXPath(using); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException because it may not work against native app UI. - */ - public void submit() throws WebDriverException { - super.submit(); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException because it may not work against native app UI. - */ - public String getCssValue(String propertyName) throws WebDriverException { - return super.getCssValue(propertyName); - } } diff --git a/src/main/java/io/appium/java_client/DriverMobileCommand.java b/src/main/java/io/appium/java_client/DriverMobileCommand.java deleted file mode 100644 index 9d991d3cb..000000000 --- a/src/main/java/io/appium/java_client/DriverMobileCommand.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * See the NOTICE file distributed with this work for additional - * information regarding copyright ownership. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.appium.java_client; - -/** - * An empty interface defining constants for the standard commands defined in the Mobile JSON - * wire protocol. - * - * @author jonahss@gmail.com (Jonah Stiennon) - */ -public interface DriverMobileCommand { - //TODO Jonah: we'll probably need this -} diff --git a/src/main/java/io/appium/java_client/FindsByAccessibilityId.java b/src/main/java/io/appium/java_client/FindsByAccessibilityId.java deleted file mode 100644 index 4d79a33a4..000000000 --- a/src/main/java/io/appium/java_client/FindsByAccessibilityId.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * See the NOTICE file distributed with this work for additional - * information regarding copyright ownership. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.appium.java_client; - -import org.openqa.selenium.NoSuchElementException; -import org.openqa.selenium.WebDriverException; -import org.openqa.selenium.WebElement; - -import java.util.List; - -public interface FindsByAccessibilityId extends FindsByFluentSelector { - /** - * Method performs the searching for a single element by accessibility ID selector - * and value of the given selector. - * - * @param using an accessibility ID selector - * @return The first element that matches the given selector - * - * @throws WebDriverException This method is not applicable with browser/webview UI. - * @throws NoSuchElementException when no one element is found - */ - default T findElementByAccessibilityId(String using) { - return findElement(MobileSelector.ACCESSIBILITY.toString(), using); - } - - /** - * Method performs the searching for a list of elements by accessibility ID selector - * and value of the given selector. - * - * @param using an accessibility ID selector - * @return a list of elements that match the given selector - * - * @throws WebDriverException This method is not applicable with browser/webview UI. - */ - default List findElementsByAccessibilityId(String using) { - return findElements(MobileSelector.ACCESSIBILITY.toString(), using); - } -} diff --git a/src/main/java/io/appium/java_client/FindsByAndroidDataMatcher.java b/src/main/java/io/appium/java_client/FindsByAndroidDataMatcher.java deleted file mode 100644 index a60477870..000000000 --- a/src/main/java/io/appium/java_client/FindsByAndroidDataMatcher.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * See the NOTICE file distributed with this work for additional - * information regarding copyright ownership. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.appium.java_client; - -import org.openqa.selenium.WebElement; - -import java.util.List; - -public interface FindsByAndroidDataMatcher extends FindsByFluentSelector { - - default T findElementByAndroidDataMatcher(String using) { - return findElement(MobileSelector.ANDROID_DATA_MATCHER.toString(), using); - } - - default List findElementsByAndroidDataMatcher(String using) { - return findElements(MobileSelector.ANDROID_DATA_MATCHER.toString(), using); - } -} diff --git a/src/main/java/io/appium/java_client/FindsByAndroidUIAutomator.java b/src/main/java/io/appium/java_client/FindsByAndroidUIAutomator.java deleted file mode 100644 index 50c7bafba..000000000 --- a/src/main/java/io/appium/java_client/FindsByAndroidUIAutomator.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * See the NOTICE file distributed with this work for additional - * information regarding copyright ownership. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.appium.java_client; - -import org.openqa.selenium.NoSuchElementException; -import org.openqa.selenium.WebDriverException; -import org.openqa.selenium.WebElement; - -import java.util.List; - -public interface FindsByAndroidUIAutomator extends FindsByFluentSelector { - - /** - * Method performs the searching for a single element by Android UIAutomator selector - * and value of the given selector. - * - * @param using an Android UIAutomator selector - * @return The first element that matches the given selector - * - * @throws WebDriverException This method is not applicable with browser/webview UI. - * @throws NoSuchElementException when no one element is found - */ - default T findElementByAndroidUIAutomator(String using) { - return findElement(MobileSelector.ANDROID_UI_AUTOMATOR.toString(), using); - } - - /** - * Method performs the searching for a list of elements by Android UIAutomator selector - * and value of the given selector. - * - * @param using an Android UIAutomator selector - * @return a list of elements that match the given selector - * - * @throws WebDriverException This method is not applicable with browser/webview UI. - */ - default List findElementsByAndroidUIAutomator(String using) { - return findElements(MobileSelector.ANDROID_UI_AUTOMATOR.toString(), using); - } -} diff --git a/src/main/java/io/appium/java_client/FindsByAndroidViewMatcher.java b/src/main/java/io/appium/java_client/FindsByAndroidViewMatcher.java deleted file mode 100644 index 1370cf3ae..000000000 --- a/src/main/java/io/appium/java_client/FindsByAndroidViewMatcher.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * See the NOTICE file distributed with this work for additional - * information regarding copyright ownership. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.appium.java_client; - -import org.openqa.selenium.WebElement; - -import java.util.List; - -public interface FindsByAndroidViewMatcher extends FindsByFluentSelector { - - default T findElementByAndroidViewMatcher(String using) { - return findElement(MobileSelector.ANDROID_VIEW_MATCHER.toString(), using); - } - - default List findElementsByAndroidViewMatcher(String using) { - return findElements(MobileSelector.ANDROID_VIEW_MATCHER.toString(), using); - } -} diff --git a/src/main/java/io/appium/java_client/FindsByAndroidViewTag.java b/src/main/java/io/appium/java_client/FindsByAndroidViewTag.java deleted file mode 100644 index b1db5c432..000000000 --- a/src/main/java/io/appium/java_client/FindsByAndroidViewTag.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * See the NOTICE file distributed with this work for additional - * information regarding copyright ownership. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.appium.java_client; - -import org.openqa.selenium.NoSuchElementException; -import org.openqa.selenium.WebDriverException; -import org.openqa.selenium.WebElement; - -import java.util.List; - -public interface FindsByAndroidViewTag extends FindsByFluentSelector { - /** - * Method performs the searching for a single element by view tag selector - * and value of the given selector. - * - * @param using an view tag selector - * @return The first element that matches the given selector - * - * @throws WebDriverException This method is not applicable with browser/webview UI. - * @throws NoSuchElementException when no one element is found - */ - default T findElementByAndroidViewTag(String using) { - return findElement(MobileSelector.ANDROID_VIEWTAG.toString(), using); - } - - /** - * Method performs the searching for a list of elements by view tag selector - * and value of the given selector. - * - * @param using an view tag selector - * @return a list of elements that match the given selector - * - * @throws WebDriverException This method is not applicable with browser/webview UI. - */ - default List findElementsByAndroidViewTag(String using) { - return findElements(MobileSelector.ANDROID_VIEWTAG.toString(), using); - } -} diff --git a/src/main/java/io/appium/java_client/FindsByCustom.java b/src/main/java/io/appium/java_client/FindsByCustom.java deleted file mode 100644 index f908fc424..000000000 --- a/src/main/java/io/appium/java_client/FindsByCustom.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * See the NOTICE file distributed with this work for additional - * information regarding copyright ownership. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.appium.java_client; - -import org.openqa.selenium.NoSuchElementException; -import org.openqa.selenium.WebElement; - -import java.util.List; - -public interface FindsByCustom extends FindsByFluentSelector { - /** - * Performs the lookup for a single element by sending a selector to a custom element finding - * plugin. This type of locator requires the use of the 'customFindModules' capability and a - * separately-installed element finding plugin. - * - * @param selector selector to pass to the custom element finding plugin - * @return The first element that matches the given selector - * @see - * The documentation on custom element finding plugins and their use - * @throws NoSuchElementException when no element is found - * @since Appium 1.9.2 - */ - default T findElementByCustom(String selector) { - return findElement(MobileSelector.CUSTOM.toString(), selector); - } - - /** - * Performs the lookup for a single element by sending a selector to a custom element finding - * plugin. This type of locator requires the use of the 'customFindModules' capability and a - * separately-installed element finding plugin. - * - * @param selector selector to pass to the custom element finding plugin - * @return a list of elements that match the given selector or an empty list - * @see - * The documentation on custom element finding plugins and their use - * @since Appium 1.9.2 - */ - default List findElementsByCustom(String selector) { - return findElements(MobileSelector.CUSTOM.toString(), selector); - } -} \ No newline at end of file diff --git a/src/main/java/io/appium/java_client/FindsByFluentSelector.java b/src/main/java/io/appium/java_client/FindsByFluentSelector.java deleted file mode 100644 index f545f47be..000000000 --- a/src/main/java/io/appium/java_client/FindsByFluentSelector.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * See the NOTICE file distributed with this work for additional - * information regarding copyright ownership. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.appium.java_client; - -import org.openqa.selenium.WebElement; - -import java.util.List; - -public interface FindsByFluentSelector { - - /** - * Method performs the searching for a single element by some selector defined by string - * and value of the given selector. - * - * @param by is a string selector - * @param using is a value of the given selector - * @return the first found element - * - * @throws org.openqa.selenium.WebDriverException when current session doesn't - * support the given selector or when value of the selector is not consistent. - * @throws org.openqa.selenium.NoSuchElementException when no one element is found - */ - T findElement(String by, String using); - - /** - * Method performs the searching for a list of elements by some selector defined by string - * and value of the given selector. - * - * @param by is a string selector - * @param using is a value of the given selector - * @return a list of elements - * - * @throws org.openqa.selenium.WebDriverException when current session doesn't support - * the given selector or when value of the selector is not consistent. - */ - List findElements(String by, String using); -} diff --git a/src/main/java/io/appium/java_client/FindsByImage.java b/src/main/java/io/appium/java_client/FindsByImage.java deleted file mode 100644 index 76de64fd1..000000000 --- a/src/main/java/io/appium/java_client/FindsByImage.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * See the NOTICE file distributed with this work for additional - * information regarding copyright ownership. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.appium.java_client; - -import org.openqa.selenium.NoSuchElementException; -import org.openqa.selenium.WebElement; - -import java.util.List; - -public interface FindsByImage extends FindsByFluentSelector { - /** - * Performs the lookup for a single element by matching its image template - * to the current full screen shot. This type of locator requires OpenCV libraries - * and bindings for NodeJS to be installed on the server machine. Lookup options - * fine-tuning might be done via {@link HasSettings#setSetting(Setting, Object)}. - * - * @param b64Template base64-encoded template image string. Supported image formats are the same - * as for OpenCV library. - * @return The first element that matches the given selector - * @throws NoSuchElementException when no element is found - * @see - * The documentation on Image Comparison Features - * @see - * The settings available for lookup fine-tuning - * @since Appium 1.8.2 - */ - default T findElementByImage(String b64Template) { - return findElement(MobileSelector.IMAGE.toString(), b64Template); - } - - /** - * Performs the lookup for a list of elements by matching them to image template - * in the current full screen shot. This type of locator requires OpenCV libraries - * and bindings for NodeJS to be installed on the server machine. Lookup options - * fine-tuning might be done via {@link HasSettings#setSetting(Setting, Object)}. - * - * @param b64Template base64-encoded template image string. Supported image formats are the same - * as for OpenCV library. - * @return a list of elements that match the given selector or an empty list - * @see - * The documentation on Image Comparison Features - * @see - * The settings available for lookup fine-tuning - * @since Appium 1.8.2 - */ - default List findElementsByImage(String b64Template) { - return findElements(MobileSelector.IMAGE.toString(), b64Template); - } -} diff --git a/src/main/java/io/appium/java_client/FindsByIosClassChain.java b/src/main/java/io/appium/java_client/FindsByIosClassChain.java deleted file mode 100644 index 92482663a..000000000 --- a/src/main/java/io/appium/java_client/FindsByIosClassChain.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * See the NOTICE file distributed with this work for additional - * information regarding copyright ownership. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.appium.java_client; - -import org.openqa.selenium.WebElement; - -import java.util.List; - -public interface FindsByIosClassChain extends FindsByFluentSelector { - - default T findElementByIosClassChain(String using) { - return findElement(MobileSelector.IOS_CLASS_CHAIN.toString(), using); - } - - default List findElementsByIosClassChain(String using) { - return findElements(MobileSelector.IOS_CLASS_CHAIN.toString(), using); - } -} diff --git a/src/main/java/io/appium/java_client/FindsByIosNSPredicate.java b/src/main/java/io/appium/java_client/FindsByIosNSPredicate.java deleted file mode 100644 index 84bc3ff67..000000000 --- a/src/main/java/io/appium/java_client/FindsByIosNSPredicate.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * See the NOTICE file distributed with this work for additional - * information regarding copyright ownership. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.appium.java_client; - -import org.openqa.selenium.WebElement; - -import java.util.List; - -public interface FindsByIosNSPredicate extends FindsByFluentSelector { - - default T findElementByIosNsPredicate(String using) { - return findElement(MobileSelector.IOS_PREDICATE_STRING.toString(), using); - } - - default List findElementsByIosNsPredicate(String using) { - return findElements(MobileSelector.IOS_PREDICATE_STRING.toString(), using); - } -} diff --git a/src/main/java/io/appium/java_client/FindsByWindowsAutomation.java b/src/main/java/io/appium/java_client/FindsByWindowsAutomation.java deleted file mode 100644 index 4416eb63f..000000000 --- a/src/main/java/io/appium/java_client/FindsByWindowsAutomation.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * See the NOTICE file distributed with this work for additional - * information regarding copyright ownership. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -package io.appium.java_client; - -import org.openqa.selenium.NoSuchElementException; -import org.openqa.selenium.WebDriverException; -import org.openqa.selenium.WebElement; - -import java.util.List; - -public interface FindsByWindowsAutomation extends FindsByFluentSelector { - - /** - * Finds the first of elements that match the Windows UIAutomation selector supplied. - * - * @param selector a Windows UIAutomation selector - * @return The first element that matches the given selector - * @throws WebDriverException This method is not applicable with browser/webview UI. - * @throws NoSuchElementException when no one element is found - */ - default T findElementByWindowsUIAutomation(String selector) { - return findElement(MobileSelector.WINDOWS_UI_AUTOMATION.toString(), selector); - } - - /** - * Finds a list of elements that match the Windows UIAutomation selector supplied. - * - * @param selector a Windows UIAutomation selector - * @return a list of elements that match the given selector - * @throws WebDriverException This method is not applicable with browser/webview UI. - */ - default List findElementsByWindowsUIAutomation(String selector) { - return findElements(MobileSelector.WINDOWS_UI_AUTOMATION.toString(), selector); - } -} diff --git a/src/main/java/io/appium/java_client/IllegalCoordinatesException.java b/src/main/java/io/appium/java_client/IllegalCoordinatesException.java deleted file mode 100644 index 8167ad65d..000000000 --- a/src/main/java/io/appium/java_client/IllegalCoordinatesException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * See the NOTICE file distributed with this work for additional - * information regarding copyright ownership. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.appium.java_client; - -import org.openqa.selenium.WebDriverException; - -public class IllegalCoordinatesException extends WebDriverException { - private static final long serialVersionUID = 1L; - - public IllegalCoordinatesException(String message) { - super(message); - } - -} diff --git a/src/main/java/io/appium/java_client/MobileBy.java b/src/main/java/io/appium/java_client/MobileBy.java index b8fd3d5db..183656627 100644 --- a/src/main/java/io/appium/java_client/MobileBy.java +++ b/src/main/java/io/appium/java_client/MobileBy.java @@ -20,45 +20,39 @@ import lombok.Getter; import org.apache.commons.lang3.StringUtils; import org.openqa.selenium.By; +import org.openqa.selenium.By.Remotable; import org.openqa.selenium.SearchContext; -import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; import java.io.Serializable; import java.util.List; @SuppressWarnings("serial") -public abstract class MobileBy extends By { - - private static final String ERROR_TEXT = "The class %s of the given context " - + "doesn't implement %s nor %s. Sorry. It is impossible to find something."; +public abstract class MobileBy extends By implements Remotable { @Getter(AccessLevel.PROTECTED) private final String locatorString; - private final MobileSelector selector; - - private static IllegalArgumentException formIllegalArgumentException(Class givenClass, - Class class1, Class class2) { - return new IllegalArgumentException(String.format(ERROR_TEXT, givenClass.getCanonicalName(), - class1.getCanonicalName(), class2.getCanonicalName())); - } + private final Parameters parameters; - protected MobileBy(MobileSelector selector, String locatorString) { + protected MobileBy(String selector, String locatorString) { if (StringUtils.isBlank(locatorString)) { throw new IllegalArgumentException("Must supply a not empty locator value."); } this.locatorString = locatorString; - this.selector = selector; + this.parameters = new Parameters(selector, locatorString); } @SuppressWarnings("unchecked") @Override public List findElements(SearchContext context) { - return (List) ((FindsByFluentSelector) context) - .findElements(selector.toString(), getLocatorString()); + return context.findElements(this); } @Override public WebElement findElement(SearchContext context) { - return ((FindsByFluentSelector) context) - .findElement(selector.toString(), getLocatorString()); + return context.findElement(this); + } + + @Override + public Parameters getRemoteParameters() { + return parameters; } /** @@ -168,64 +162,20 @@ public static By custom(final String selector) { return new ByCustom(selector); } + /** + * For IOS it is the full name of the XCUI element and begins with XCUIElementType. + * For Android it is the full name of the UIAutomator2 class (e.g.: android.widget.TextView) + * @param selector the class name of the element + * @return an instance of {@link ByClassName} + */ + public static By className(final String selector) { + return new ByClassName(selector); + } public static class ByAndroidUIAutomator extends MobileBy implements Serializable { - public ByAndroidUIAutomator(String uiautomatorText) { - super(MobileSelector.ANDROID_UI_AUTOMATOR, uiautomatorText); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @SuppressWarnings("unchecked") - @Override - public List findElements(SearchContext context) throws WebDriverException, - IllegalArgumentException { - Class contextClass = context.getClass(); - - if (FindsByAndroidUIAutomator.class.isAssignableFrom(contextClass)) { - return FindsByAndroidUIAutomator.class.cast(context) - .findElementsByAndroidUIAutomator(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElements(context); - } - - throw formIllegalArgumentException(contextClass, FindsByAndroidUIAutomator.class, - FindsByFluentSelector.class); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @Override public WebElement findElement(SearchContext context) throws WebDriverException, - IllegalArgumentException { - Class contextClass = context.getClass(); - - if (FindsByAndroidUIAutomator.class.isAssignableFrom(contextClass)) { - return FindsByAndroidUIAutomator.class.cast(context) - .findElementByAndroidUIAutomator(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElement(context); - } - - throw formIllegalArgumentException(contextClass, FindsByAndroidUIAutomator.class, - FindsByFluentSelector.class); + super("-android uiautomator", uiautomatorText); } @Override public String toString() { @@ -237,59 +187,7 @@ public List findElements(SearchContext context) throws WebDriverExce public static class ByAccessibilityId extends MobileBy implements Serializable { public ByAccessibilityId(String accessibilityId) { - super(MobileSelector.ACCESSIBILITY, accessibilityId); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @SuppressWarnings("unchecked") - @Override - public List findElements(SearchContext context) throws WebDriverException, - IllegalArgumentException { - Class contextClass = context.getClass(); - - if (FindsByAccessibilityId.class.isAssignableFrom(contextClass)) { - return FindsByAccessibilityId.class.cast(context) - .findElementsByAccessibilityId(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElements(context); - } - - throw formIllegalArgumentException(contextClass, FindsByAccessibilityId.class, - FindsByFluentSelector.class); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @Override public WebElement findElement(SearchContext context) throws WebDriverException, - IllegalArgumentException { - Class contextClass = context.getClass(); - - if (FindsByAccessibilityId.class.isAssignableFrom(contextClass)) { - return FindsByAccessibilityId.class.cast(context) - .findElementByAccessibilityId(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElement(context); - } - - throw formIllegalArgumentException(contextClass, FindsByAccessibilityId.class, - FindsByFluentSelector.class); + super("accessibility id", accessibilityId); } @Override public String toString() { @@ -300,56 +198,7 @@ public List findElements(SearchContext context) throws WebDriverExce public static class ByIosClassChain extends MobileBy implements Serializable { protected ByIosClassChain(String locatorString) { - super(MobileSelector.IOS_CLASS_CHAIN, locatorString); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @SuppressWarnings("unchecked") - @Override public List findElements(SearchContext context) { - Class contextClass = context.getClass(); - - if (FindsByIosClassChain.class.isAssignableFrom(contextClass)) { - return FindsByIosClassChain.class.cast(context) - .findElementsByIosClassChain(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElements(context); - } - - throw formIllegalArgumentException(contextClass, FindsByIosClassChain.class, - FindsByFluentSelector.class); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @Override public WebElement findElement(SearchContext context) { - Class contextClass = context.getClass(); - - if (FindsByIosClassChain.class.isAssignableFrom(contextClass)) { - return FindsByIosClassChain.class.cast(context) - .findElementByIosClassChain(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElement(context); - } - - throw formIllegalArgumentException(contextClass, FindsByIosClassChain.class, - FindsByFluentSelector.class); + super("-ios class chain", locatorString); } @Override public String toString() { @@ -360,176 +209,29 @@ protected ByIosClassChain(String locatorString) { public static class ByAndroidDataMatcher extends MobileBy implements Serializable { protected ByAndroidDataMatcher(String locatorString) { - super(MobileSelector.ANDROID_DATA_MATCHER, locatorString); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @SuppressWarnings("unchecked") - @Override public List findElements(SearchContext context) { - Class contextClass = context.getClass(); - - if (FindsByAndroidDataMatcher.class.isAssignableFrom(contextClass)) { - return FindsByAndroidDataMatcher.class.cast(context) - .findElementsByAndroidDataMatcher(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElements(context); - } - - throw formIllegalArgumentException(contextClass, FindsByAndroidDataMatcher.class, - FindsByFluentSelector.class); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @Override public WebElement findElement(SearchContext context) { - Class contextClass = context.getClass(); - - if (FindsByAndroidDataMatcher.class.isAssignableFrom(contextClass)) { - return FindsByAndroidDataMatcher.class.cast(context) - .findElementByAndroidDataMatcher(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElement(context); - } - - throw formIllegalArgumentException(contextClass, FindsByAndroidDataMatcher.class, - FindsByFluentSelector.class); + super("-android datamatcher", locatorString); } @Override public String toString() { - return "By.FindsByAndroidDataMatcher: " + getLocatorString(); + return "By.AndroidDataMatcher: " + getLocatorString(); } } public static class ByAndroidViewMatcher extends MobileBy implements Serializable { protected ByAndroidViewMatcher(String locatorString) { - super(MobileSelector.ANDROID_VIEW_MATCHER, locatorString); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @SuppressWarnings("unchecked") - @Override public List findElements(SearchContext context) { - Class contextClass = context.getClass(); - - if (FindsByAndroidViewMatcher.class.isAssignableFrom(contextClass)) { - return FindsByAndroidViewMatcher.class.cast(context) - .findElementsByAndroidViewMatcher(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElements(context); - } - - throw formIllegalArgumentException(contextClass, FindsByAndroidViewMatcher.class, - FindsByFluentSelector.class); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @Override public WebElement findElement(SearchContext context) { - Class contextClass = context.getClass(); - - if (FindsByAndroidViewMatcher.class.isAssignableFrom(contextClass)) { - return FindsByAndroidViewMatcher.class.cast(context) - .findElementByAndroidViewMatcher(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElement(context); - } - - throw formIllegalArgumentException(contextClass, FindsByAndroidViewMatcher.class, - FindsByFluentSelector.class); + super("-android viewmatcher", locatorString); } @Override public String toString() { - return "By.FindsByAndroidViewMatcher: " + getLocatorString(); + return "By.AndroidViewMatcher: " + getLocatorString(); } } public static class ByIosNsPredicate extends MobileBy implements Serializable { protected ByIosNsPredicate(String locatorString) { - super(MobileSelector.IOS_PREDICATE_STRING, locatorString); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @SuppressWarnings("unchecked") - @Override public List findElements(SearchContext context) { - Class contextClass = context.getClass(); - - if (FindsByIosNSPredicate.class.isAssignableFrom(contextClass)) { - return FindsByIosNSPredicate.class.cast(context) - .findElementsByIosNsPredicate(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElements(context); - } - - throw formIllegalArgumentException(contextClass, FindsByIosNSPredicate.class, - FindsByFluentSelector.class); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @Override public WebElement findElement(SearchContext context) { - Class contextClass = context.getClass(); - - if (FindsByIosNSPredicate.class.isAssignableFrom(contextClass)) { - return FindsByIosNSPredicate.class.cast(context) - .findElementByIosNsPredicate(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElement(context); - } - - throw formIllegalArgumentException(contextClass, FindsByIosNSPredicate.class, - FindsByFluentSelector.class); + super("-ios predicate string", locatorString); } @Override public String toString() { @@ -540,108 +242,15 @@ protected ByIosNsPredicate(String locatorString) { public static class ByWindowsAutomation extends MobileBy implements Serializable { protected ByWindowsAutomation(String locatorString) { - super(MobileSelector.WINDOWS_UI_AUTOMATION, locatorString); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @SuppressWarnings("unchecked") - @Override public List findElements(SearchContext context) { - Class contextClass = context.getClass(); - - if (FindsByWindowsAutomation.class.isAssignableFrom(contextClass)) { - return FindsByWindowsAutomation.class.cast(context) - .findElementsByWindowsUIAutomation(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElements(context); - } - - throw formIllegalArgumentException(contextClass, FindsByWindowsAutomation.class, - FindsByFluentSelector.class); + super("-windows uiautomation", locatorString); } - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @Override public WebElement findElement(SearchContext context) { - Class contextClass = context.getClass(); - - if (FindsByWindowsAutomation.class.isAssignableFrom(contextClass)) { - return FindsByWindowsAutomation.class.cast(context) - .findElementByWindowsUIAutomation(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElement(context); - } - - throw formIllegalArgumentException(contextClass, FindsByIosNSPredicate.class, - FindsByWindowsAutomation.class); - } } public static class ByImage extends MobileBy implements Serializable { protected ByImage(String b64Template) { - super(MobileSelector.IMAGE, b64Template); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @SuppressWarnings("unchecked") - @Override public List findElements(SearchContext context) { - Class contextClass = context.getClass(); - - if (FindsByImage.class.isAssignableFrom(contextClass)) { - return FindsByImage.class.cast(context).findElementsByImage(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElements(context); - } - - throw formIllegalArgumentException(contextClass, FindsByImage.class, FindsByFluentSelector.class); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @Override public WebElement findElement(SearchContext context) { - Class contextClass = context.getClass(); - - if (FindsByImage.class.isAssignableFrom(contextClass)) { - return FindsByImage.class.cast(context).findElementByImage(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElement(context); - } - - throw formIllegalArgumentException(contextClass, FindsByImage.class, FindsByFluentSelector.class); + super("-image", b64Template); } @Override public String toString() { @@ -652,52 +261,7 @@ protected ByImage(String b64Template) { public static class ByCustom extends MobileBy implements Serializable { protected ByCustom(String selector) { - super(MobileSelector.CUSTOM, selector); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @SuppressWarnings("unchecked") - @Override public List findElements(SearchContext context) { - Class contextClass = context.getClass(); - - if (FindsByCustom.class.isAssignableFrom(contextClass)) { - return FindsByCustom.class.cast(context).findElementsByCustom(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElements(context); - } - - throw formIllegalArgumentException(contextClass, FindsByCustom.class, FindsByFluentSelector.class); - } - - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @Override public WebElement findElement(SearchContext context) { - Class contextClass = context.getClass(); - - if (FindsByCustom.class.isAssignableFrom(contextClass)) { - return FindsByCustom.class.cast(context).findElementByCustom(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElement(context); - } - - throw formIllegalArgumentException(contextClass, FindsByCustom.class, FindsByFluentSelector.class); + super("-custom", selector); } @Override public String toString() { @@ -708,63 +272,22 @@ protected ByCustom(String selector) { public static class ByAndroidViewTag extends MobileBy implements Serializable { public ByAndroidViewTag(String tag) { - super(MobileSelector.ANDROID_VIEWTAG, tag); + super("-android viewtag", tag); } - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @SuppressWarnings("unchecked") - @Override - public List findElements(SearchContext context) throws WebDriverException, - IllegalArgumentException { - Class contextClass = context.getClass(); - - if (FindsByAndroidViewTag.class.isAssignableFrom(contextClass)) { - return FindsByAndroidViewTag.class.cast(context) - .findElementsByAndroidViewTag(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElements(context); - } - - throw formIllegalArgumentException(contextClass, FindsByAndroidViewTag.class, - FindsByFluentSelector.class); + @Override public String toString() { + return "By.AndroidViewTag: " + getLocatorString(); } + } + + public static class ByClassName extends MobileBy implements Serializable { - /** - * {@inheritDoc} - * - * @throws WebDriverException when current session doesn't support the given selector or when - * value of the selector is not consistent. - * @throws IllegalArgumentException when it is impossible to find something on the given - * {@link SearchContext} instance - */ - @Override public WebElement findElement(SearchContext context) throws WebDriverException, - IllegalArgumentException { - Class contextClass = context.getClass(); - - if (FindsByAndroidViewTag.class.isAssignableFrom(contextClass)) { - return FindsByAndroidViewTag.class.cast(context) - .findElementByAndroidViewTag(getLocatorString()); - } - - if (FindsByFluentSelector.class.isAssignableFrom(contextClass)) { - return super.findElement(context); - } - - throw formIllegalArgumentException(contextClass, FindsByAndroidViewTag.class, - FindsByFluentSelector.class); + protected ByClassName(String selector) { + super("class name", selector); } @Override public String toString() { - return "By.AndroidViewTag: " + getLocatorString(); + return "By.className: " + getLocatorString(); } } } diff --git a/src/main/java/io/appium/java_client/MobileDriver.java b/src/main/java/io/appium/java_client/MobileDriver.java index e982d5419..708f3b8f0 100644 --- a/src/main/java/io/appium/java_client/MobileDriver.java +++ b/src/main/java/io/appium/java_client/MobileDriver.java @@ -22,55 +22,14 @@ import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.html5.LocationContext; -import org.openqa.selenium.internal.FindsByClassName; -import org.openqa.selenium.internal.FindsByCssSelector; -import org.openqa.selenium.internal.FindsById; -import org.openqa.selenium.internal.FindsByLinkText; -import org.openqa.selenium.internal.FindsByName; -import org.openqa.selenium.internal.FindsByTagName; -import org.openqa.selenium.internal.FindsByXPath; import java.util.List; public interface MobileDriver extends WebDriver, PerformsTouchActions, ContextAware, Rotatable, - FindsByAccessibilityId, LocationContext, HidesKeyboard, HasDeviceTime, - InteractsWithFiles, InteractsWithApps, HasAppStrings, FindsByClassName, FindsByCssSelector, FindsById, - FindsByLinkText, FindsByName, FindsByTagName, FindsByXPath, FindsByFluentSelector, ExecutesMethod, + LocationContext, HidesKeyboard, HasDeviceTime, InteractsWithFiles, InteractsWithApps, HasAppStrings, ExecutesMethod, HasSessionDetails { List findElements(By by); T findElement(By by); - - T findElementByClassName(String className); - - List findElementsByClassName(String className); - - T findElementByCssSelector(String cssSelector); - - List findElementsByCssSelector(String cssSelector); - - T findElementById(String id); - - List findElementsById(String id); - - T findElementByLinkText(String linkText); - - List findElementsByLinkText(String linkText); - - T findElementByPartialLinkText(String partialLinkText); - - List findElementsByPartialLinkText(String partialLinkText); - - T findElementByName(String name); - - List findElementsByName(String name); - - T findElementByTagName(String tagName); - - List findElementsByTagName(String tagName); - - T findElementByXPath(String xPath); - - List findElementsByXPath(String xPath); } diff --git a/src/main/java/io/appium/java_client/MobileElement.java b/src/main/java/io/appium/java_client/MobileElement.java index a8decf61d..45c932b12 100644 --- a/src/main/java/io/appium/java_client/MobileElement.java +++ b/src/main/java/io/appium/java_client/MobileElement.java @@ -29,8 +29,6 @@ public abstract class MobileElement extends DefaultGenericMobileElement { - protected FileDetector fileDetector; - /** * Method returns central coordinates of an element. * @return The instance of the {@link org.openqa.selenium.Point} @@ -46,46 +44,6 @@ public Point getCenter() { return super.findElements(by); } - @Override public List findElements(String by, String using) { - return super.findElements(by, using); - } - - @Override public List findElementsById(String id) { - return super.findElementsById(id); - } - - public List findElementsByLinkText(String using) { - return super.findElementsByLinkText(using); - } - - public List findElementsByPartialLinkText(String using) { - return super.findElementsByPartialLinkText(using); - } - - public List findElementsByTagName(String using) { - return super.findElementsByTagName(using); - } - - public List findElementsByName(String using) { - return super.findElementsByName(using); - } - - public List findElementsByClassName(String using) { - return super.findElementsByClassName(using); - } - - public List findElementsByCssSelector(String using) { - return super.findElementsByCssSelector(using); - } - - public List findElementsByXPath(String using) { - return super.findElementsByXPath(using); - } - - @Override public List findElementsByAccessibilityId(String using) { - return super.findElementsByAccessibilityId(using); - } - /** * This method sets the new value of the attribute "value". * diff --git a/src/main/java/io/appium/java_client/MobileSelector.java b/src/main/java/io/appium/java_client/MobileSelector.java deleted file mode 100644 index 0fbe3284e..000000000 --- a/src/main/java/io/appium/java_client/MobileSelector.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * See the NOTICE file distributed with this work for additional - * information regarding copyright ownership. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.appium.java_client; - -public enum MobileSelector { - ACCESSIBILITY("accessibility id"), - ANDROID_UI_AUTOMATOR("-android uiautomator"), - IOS_UI_AUTOMATION("-ios uiautomation"), - IOS_PREDICATE_STRING("-ios predicate string"), - IOS_CLASS_CHAIN("-ios class chain"), - WINDOWS_UI_AUTOMATION("-windows uiautomation"), - IMAGE("-image"), - ANDROID_VIEWTAG("-android viewtag"), - ANDROID_DATA_MATCHER("-android datamatcher"), - ANDROID_VIEW_MATCHER("-android viewmatcher"), - CUSTOM("-custom"); - - private final String selector; - - MobileSelector(String selector) { - this.selector = selector; - } - - @Override public String toString() { - return selector; - } -} diff --git a/src/main/java/io/appium/java_client/android/Activity.java b/src/main/java/io/appium/java_client/android/Activity.java index da957d746..41a17dc8c 100644 --- a/src/main/java/io/appium/java_client/android/Activity.java +++ b/src/main/java/io/appium/java_client/android/Activity.java @@ -2,7 +2,6 @@ import lombok.Data; import lombok.experimental.Accessors; -import okhttp3.Interceptor; import static com.google.common.base.Preconditions.checkArgument; import static org.apache.commons.lang3.StringUtils.isBlank; diff --git a/src/main/java/io/appium/java_client/android/AndroidDriver.java b/src/main/java/io/appium/java_client/android/AndroidDriver.java index 1994bb69a..be4bd8e3d 100644 --- a/src/main/java/io/appium/java_client/android/AndroidDriver.java +++ b/src/main/java/io/appium/java_client/android/AndroidDriver.java @@ -26,10 +26,6 @@ import io.appium.java_client.AppiumDriver; import io.appium.java_client.CommandExecutionHelper; import io.appium.java_client.ExecuteCDPCommand; -import io.appium.java_client.FindsByAndroidDataMatcher; -import io.appium.java_client.FindsByAndroidViewMatcher; -import io.appium.java_client.FindsByAndroidUIAutomator; -import io.appium.java_client.FindsByAndroidViewTag; import io.appium.java_client.HasOnScreenKeyboard; import io.appium.java_client.LocksDevice; import io.appium.java_client.android.connection.HasNetworkConnection; @@ -63,13 +59,10 @@ */ public class AndroidDriver extends AppiumDriver - implements PressesKey, HasNetworkConnection, PushesFiles, StartsActivity, - FindsByAndroidUIAutomator, FindsByAndroidViewTag, FindsByAndroidDataMatcher, - FindsByAndroidViewMatcher, LocksDevice, HasAndroidSettings, HasAndroidDeviceDetails, - HasSupportedPerformanceDataType, AuthenticatesByFinger, HasOnScreenKeyboard, - CanRecordScreen, SupportsSpecialEmulatorCommands, - SupportsNetworkStateManagement, ListensToLogcatMessages, HasAndroidClipboard, - HasBattery, ExecuteCDPCommand, SupportsExtendedGeolocationCommands { + implements PressesKey, HasNetworkConnection, PushesFiles, StartsActivity,LocksDevice, HasAndroidSettings, + HasAndroidDeviceDetails, HasSupportedPerformanceDataType, AuthenticatesByFinger, HasOnScreenKeyboard, + CanRecordScreen, SupportsSpecialEmulatorCommands, SupportsNetworkStateManagement, ListensToLogcatMessages, + HasAndroidClipboard, HasBattery, ExecuteCDPCommand, SupportsExtendedGeolocationCommands { private static final String ANDROID_PLATFORM = MobilePlatform.ANDROID; diff --git a/src/main/java/io/appium/java_client/android/AndroidElement.java b/src/main/java/io/appium/java_client/android/AndroidElement.java index 95899e4db..5c1231c24 100644 --- a/src/main/java/io/appium/java_client/android/AndroidElement.java +++ b/src/main/java/io/appium/java_client/android/AndroidElement.java @@ -19,15 +19,9 @@ import static io.appium.java_client.android.AndroidMobileCommandHelper.replaceElementValueCommand; import io.appium.java_client.CommandExecutionHelper; -import io.appium.java_client.FindsByAndroidDataMatcher; -import io.appium.java_client.FindsByAndroidViewMatcher; -import io.appium.java_client.FindsByAndroidUIAutomator; -import io.appium.java_client.FindsByAndroidViewTag; import io.appium.java_client.MobileElement; -public class AndroidElement extends MobileElement - implements FindsByAndroidUIAutomator, FindsByAndroidDataMatcher, - FindsByAndroidViewMatcher, FindsByAndroidViewTag { +public class AndroidElement extends MobileElement { /** * This method replace current text value. * @param value a new value diff --git a/src/main/java/io/appium/java_client/android/AndroidOptions.java b/src/main/java/io/appium/java_client/android/AndroidOptions.java index 768bf75eb..780f92cd4 100644 --- a/src/main/java/io/appium/java_client/android/AndroidOptions.java +++ b/src/main/java/io/appium/java_client/android/AndroidOptions.java @@ -22,11 +22,15 @@ public class AndroidOptions extends MobileOptions { public AndroidOptions() { - setPlatformName(MobilePlatform.ANDROID); + setAndroidPlatformName(); } public AndroidOptions(Capabilities source) { - this(); - merge(source); + super(source); + setAndroidPlatformName(); + } + + private void setAndroidPlatformName() { + setPlatformName(MobilePlatform.ANDROID); } } diff --git a/src/main/java/io/appium/java_client/events/DefaultAspect.java b/src/main/java/io/appium/java_client/events/DefaultAspect.java index 345ec77ee..3ce9794be 100644 --- a/src/main/java/io/appium/java_client/events/DefaultAspect.java +++ b/src/main/java/io/appium/java_client/events/DefaultAspect.java @@ -97,19 +97,6 @@ class DefaultAspect { + "execution(* org.openqa.selenium.WebDriver.TargetLocator.*(..)) || " + "execution(* org.openqa.selenium.JavascriptExecutor.*(..)) || " + "execution(* org.openqa.selenium.ContextAware.*(..)) || " - + "execution(* io.appium.java_client.FindsByAccessibilityId.*(..)) || " - + "execution(* io.appium.java_client.FindsByAndroidUIAutomator.*(..)) || " - + "execution(* io.appium.java_client.FindsByAndroidDataMatcher.*(..)) || " - + "execution(* io.appium.java_client.FindsByAndroidViewMatcher.*(..)) || " - + "execution(* io.appium.java_client.FindsByWindowsAutomation.*(..)) || " - + "execution(* io.appium.java_client.FindsByIosNSPredicate.*(..)) || " - + "execution(* org.openqa.selenium.internal.FindsByClassName.*(..)) || " - + "execution(* org.openqa.selenium.internal.FindsByCssSelector.*(..)) || " - + "execution(* org.openqa.selenium.internal.FindsById.*(..)) || " - + "execution(* org.openqa.selenium.internal.FindsByLinkText.*(..)) || " - + "execution(* org.openqa.selenium.internal.FindsByName.*(..)) || " - + "execution(* org.openqa.selenium.internal.FindsByTagName.*(..)) || " - + "execution(* org.openqa.selenium.internal.FindsByXPath.*(..)) || " + "execution(* org.openqa.selenium.WebDriver.Window.*(..)) || " + "execution(* io.appium.java_client.android.AndroidElement.*(..)) || " + "execution(* io.appium.java_client.ios.IOSElement.*(..)) || " diff --git a/src/main/java/io/appium/java_client/internal/JsonToMobileElementConverter.java b/src/main/java/io/appium/java_client/internal/JsonToMobileElementConverter.java index 9f8674a90..d69e39312 100644 --- a/src/main/java/io/appium/java_client/internal/JsonToMobileElementConverter.java +++ b/src/main/java/io/appium/java_client/internal/JsonToMobileElementConverter.java @@ -22,9 +22,9 @@ import org.openqa.selenium.Capabilities; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.remote.CapabilityType; +import org.openqa.selenium.remote.JsonToWebElementConverter; import org.openqa.selenium.remote.RemoteWebDriver; import org.openqa.selenium.remote.RemoteWebElement; -import org.openqa.selenium.remote.internal.JsonToWebElementConverter; import java.lang.reflect.Constructor; diff --git a/src/main/java/io/appium/java_client/ios/IOSDriver.java b/src/main/java/io/appium/java_client/ios/IOSDriver.java index 229aac70b..ffd4a8a0c 100644 --- a/src/main/java/io/appium/java_client/ios/IOSDriver.java +++ b/src/main/java/io/appium/java_client/ios/IOSDriver.java @@ -22,8 +22,6 @@ import com.google.common.collect.ImmutableMap; import io.appium.java_client.AppiumDriver; -import io.appium.java_client.FindsByIosClassChain; -import io.appium.java_client.FindsByIosNSPredicate; import io.appium.java_client.HasOnScreenKeyboard; import io.appium.java_client.HidesKeyboardWithKeyName; import io.appium.java_client.LocksDevice; @@ -59,9 +57,8 @@ */ public class IOSDriver extends AppiumDriver - implements HidesKeyboardWithKeyName, ShakesDevice, HasIOSSettings, HasOnScreenKeyboard, - LocksDevice, PerformsTouchID, FindsByIosNSPredicate, FindsByIosClassChain, - PushesFiles, CanRecordScreen, HasIOSClipboard, ListensToSyslogMessages, + implements HidesKeyboardWithKeyName, ShakesDevice, HasIOSSettings, HasOnScreenKeyboard, LocksDevice, + PerformsTouchID, PushesFiles, CanRecordScreen, HasIOSClipboard, ListensToSyslogMessages, HasBattery { private static final String IOS_DEFAULT_PLATFORM = MobilePlatform.IOS; diff --git a/src/main/java/io/appium/java_client/ios/IOSElement.java b/src/main/java/io/appium/java_client/ios/IOSElement.java index a406053a0..55aa47110 100644 --- a/src/main/java/io/appium/java_client/ios/IOSElement.java +++ b/src/main/java/io/appium/java_client/ios/IOSElement.java @@ -16,10 +16,7 @@ package io.appium.java_client.ios; -import io.appium.java_client.FindsByIosClassChain; -import io.appium.java_client.FindsByIosNSPredicate; import io.appium.java_client.MobileElement; -public class IOSElement extends MobileElement - implements FindsByIosNSPredicate, FindsByIosClassChain { +public class IOSElement extends MobileElement { } diff --git a/src/main/java/io/appium/java_client/ios/IOSOptions.java b/src/main/java/io/appium/java_client/ios/IOSOptions.java index 14af6aad6..9d4c82b6e 100644 --- a/src/main/java/io/appium/java_client/ios/IOSOptions.java +++ b/src/main/java/io/appium/java_client/ios/IOSOptions.java @@ -22,11 +22,15 @@ public class IOSOptions extends MobileOptions { public IOSOptions() { - setPlatformName(MobilePlatform.IOS); + setIOSPlatformName(); } public IOSOptions(Capabilities source) { - this(); - merge(source); + super(source); + setIOSPlatformName(); + } + + private void setIOSPlatformName() { + setPlatformName(MobilePlatform.IOS); } } diff --git a/src/main/java/io/appium/java_client/mac/FindsByClassChain.java b/src/main/java/io/appium/java_client/mac/FindsByClassChain.java deleted file mode 100644 index 3d4eaffcc..000000000 --- a/src/main/java/io/appium/java_client/mac/FindsByClassChain.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * See the NOTICE file distributed with this work for additional - * information regarding copyright ownership. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.appium.java_client.mac; - -import io.appium.java_client.FindsByFluentSelector; -import io.appium.java_client.MobileSelector; -import org.openqa.selenium.WebElement; - -import java.util.List; - -public interface FindsByClassChain extends FindsByFluentSelector { - - /** - * Perform single element lookup by class chain expression. - * Read https://github.com/appium/appium-mac2-driver#element-location - * for more details on elements location strategies supported by Mac2 driver. - * - * @param using A valid class chain lookup expression. - * @return The found element - */ - default T findElementByClassChain(String using) { - return findElement(MobileSelector.IOS_CLASS_CHAIN.toString(), using); - } - - /** - * Perform multiple elements lookup by class chain search expression. - * Read https://github.com/appium/appium-mac2-driver#element-location - * for more details on elements location strategies supported by Mac2 driver. - * - * @param using A valid class chain lookup expression. - * @return The array of found elements or an empty one if no matches have been found. - */ - default List findElementsByClassChain(String using) { - return findElements(MobileSelector.IOS_CLASS_CHAIN.toString(), using); - } -} diff --git a/src/main/java/io/appium/java_client/mac/FindsByNsPredicate.java b/src/main/java/io/appium/java_client/mac/FindsByNsPredicate.java deleted file mode 100644 index 665732eb3..000000000 --- a/src/main/java/io/appium/java_client/mac/FindsByNsPredicate.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * See the NOTICE file distributed with this work for additional - * information regarding copyright ownership. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.appium.java_client.mac; - -import io.appium.java_client.FindsByFluentSelector; -import io.appium.java_client.MobileSelector; -import org.openqa.selenium.WebElement; - -import java.util.List; - -public interface FindsByNsPredicate extends FindsByFluentSelector { - - /** - * Perform single element lookup by predicate search expression. - * Read https://github.com/appium/appium-mac2-driver#element-location - * for more details on elements location strategies supported by Mac2 driver. - * - * @param using A valid predicate lookup expression. - * @return The found element - */ - default T findElementByNsPredicate(String using) { - return findElement(MobileSelector.IOS_PREDICATE_STRING.toString(), using); - } - - /** - * Perform multiple elements lookup by predicate search expression. - * Read https://github.com/appium/appium-mac2-driver#element-location - * for more details on elements location strategies supported by Mac2 driver. - * - * @param using A valid predicate lookup expression. - * @return The array of found elements or an empty one if no matches have been found. - */ - default List findElementsByNsPredicate(String using) { - return findElements(MobileSelector.IOS_PREDICATE_STRING.toString(), using); - } -} diff --git a/src/main/java/io/appium/java_client/mac/Mac2Driver.java b/src/main/java/io/appium/java_client/mac/Mac2Driver.java index d76eaf5d7..215c28971 100644 --- a/src/main/java/io/appium/java_client/mac/Mac2Driver.java +++ b/src/main/java/io/appium/java_client/mac/Mac2Driver.java @@ -44,9 +44,7 @@ * * @since Appium 1.20.0 */ -public class Mac2Driver - extends AppiumDriver implements CanRecordScreen, FindsByClassChain, - FindsByNsPredicate, HasSettings { +public class Mac2Driver extends AppiumDriver implements CanRecordScreen, HasSettings { public Mac2Driver(HttpCommandExecutor executor, Capabilities capabilities) { super(executor, prepareCaps(capabilities)); } diff --git a/src/main/java/io/appium/java_client/mac/Mac2Element.java b/src/main/java/io/appium/java_client/mac/Mac2Element.java index 905bada6e..e41042e8d 100644 --- a/src/main/java/io/appium/java_client/mac/Mac2Element.java +++ b/src/main/java/io/appium/java_client/mac/Mac2Element.java @@ -18,6 +18,5 @@ import io.appium.java_client.MobileElement; -public class Mac2Element extends MobileElement implements - FindsByClassChain, FindsByNsPredicate { +public class Mac2Element extends MobileElement { } diff --git a/src/main/java/io/appium/java_client/pagefactory/bys/builder/Strategies.java b/src/main/java/io/appium/java_client/pagefactory/bys/builder/Strategies.java index 718cd403c..4b853f046 100644 --- a/src/main/java/io/appium/java_client/pagefactory/bys/builder/Strategies.java +++ b/src/main/java/io/appium/java_client/pagefactory/bys/builder/Strategies.java @@ -46,7 +46,7 @@ enum Strategies { }, BYCLASSNAME("className") { @Override By getBy(Annotation annotation) { - return By.className(getValue(annotation, this)); + return MobileBy.className(getValue(annotation, this)); } }, BYID("id") { diff --git a/src/main/java/io/appium/java_client/remote/AppiumCommandExecutor.java b/src/main/java/io/appium/java_client/remote/AppiumCommandExecutor.java index 2b0f77f7e..28af10cfc 100644 --- a/src/main/java/io/appium/java_client/remote/AppiumCommandExecutor.java +++ b/src/main/java/io/appium/java_client/remote/AppiumCommandExecutor.java @@ -44,16 +44,21 @@ import org.openqa.selenium.remote.ProtocolHandshake; import org.openqa.selenium.remote.Response; import org.openqa.selenium.remote.ResponseCodec; +import org.openqa.selenium.remote.codec.w3c.W3CHttpCommandCodec; +import org.openqa.selenium.remote.http.Filter; import org.openqa.selenium.remote.http.HttpClient; +import org.openqa.selenium.remote.http.HttpHandler; import org.openqa.selenium.remote.http.HttpRequest; import org.openqa.selenium.remote.http.HttpResponse; -import org.openqa.selenium.remote.http.W3CHttpCommandCodec; +import org.openqa.selenium.remote.http.WebSocket; +import org.openqa.selenium.remote.http.WebSocket.Listener; import org.openqa.selenium.remote.service.DriverService; import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStreamWriter; +import java.io.UncheckedIOException; import java.io.Writer; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; @@ -156,13 +161,6 @@ protected HttpClient getClient() { return getPrivateFieldValue("client", HttpClient.class); } - protected HttpClient withRequestsPatchedByIdempotencyKey(HttpClient httpClient) { - return (request) -> { - request.setHeader(IDEMPOTENCY_KEY_HEADER, UUID.randomUUID().toString().toLowerCase()); - return httpClient.execute(request); - }; - } - private Response createSession(Command command) throws IOException { if (getCommandCodec() != null) { throw new SessionNotCreatedException("Session already exists"); @@ -191,7 +189,10 @@ public Result createSession(HttpClient client, Command command) throws IOExcepti createSessionMethod.setAccessible(true); Optional result = (Optional) createSessionMethod.invoke(this, - withRequestsPatchedByIdempotencyKey(client), contentStream, counter.getCount()); + client.with(httpHandler -> req -> { + req.setHeader(IDEMPOTENCY_KEY_HEADER, UUID.randomUUID().toString().toLowerCase()); + return httpHandler.execute(req); + }), contentStream, counter.getCount()); return result.map(result1 -> { Result toReturn = result.get(); diff --git a/src/main/java/io/appium/java_client/remote/AppiumW3CHttpCommandCodec.java b/src/main/java/io/appium/java_client/remote/AppiumW3CHttpCommandCodec.java index aec7ebd75..0fe0ace05 100644 --- a/src/main/java/io/appium/java_client/remote/AppiumW3CHttpCommandCodec.java +++ b/src/main/java/io/appium/java_client/remote/AppiumW3CHttpCommandCodec.java @@ -32,7 +32,7 @@ import org.openqa.selenium.interactions.KeyInput; import org.openqa.selenium.interactions.Sequence; -import org.openqa.selenium.remote.http.W3CHttpCommandCodec; +import org.openqa.selenium.remote.codec.w3c.W3CHttpCommandCodec; import java.util.Collection; import java.util.Map; diff --git a/src/main/java/io/appium/java_client/remote/MobileOptions.java b/src/main/java/io/appium/java_client/remote/MobileOptions.java index 6a7810f1a..bf8ea1f38 100644 --- a/src/main/java/io/appium/java_client/remote/MobileOptions.java +++ b/src/main/java/io/appium/java_client/remote/MobileOptions.java @@ -18,6 +18,7 @@ import org.openqa.selenium.Capabilities; import org.openqa.selenium.MutableCapabilities; +import org.openqa.selenium.Platform; import org.openqa.selenium.ScreenOrientation; import org.openqa.selenium.remote.CapabilityType; @@ -38,7 +39,7 @@ public MobileOptions() { * @param source is Capabilities instance to merge into new instance */ public MobileOptions(Capabilities source) { - merge(source); + super(source); } /** @@ -52,16 +53,6 @@ public T setPlatformName(String platform) { return amend(CapabilityType.PLATFORM_NAME, platform); } - /** - * Get the kind of mobile device or emulator to use. - * - * @return String representing the kind of mobile device or emulator to use. - * @see org.openqa.selenium.remote.CapabilityType#PLATFORM_NAME - */ - public String getPlatformName() { - return (String) getCapability(CapabilityType.PLATFORM_NAME); - } - /** * Set the absolute local path for the location of the App. * The or remote http URL to a {@code .ipa} file (IOS), diff --git a/src/main/java/io/appium/java_client/service/local/AppiumDriverLocalService.java b/src/main/java/io/appium/java_client/service/local/AppiumDriverLocalService.java index 3e82e0de4..37851fd4b 100644 --- a/src/main/java/io/appium/java_client/service/local/AppiumDriverLocalService.java +++ b/src/main/java/io/appium/java_client/service/local/AppiumDriverLocalService.java @@ -22,8 +22,6 @@ import static org.slf4j.event.Level.INFO; import com.google.common.annotations.VisibleForTesting; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; import org.apache.commons.lang3.StringUtils; @@ -42,6 +40,7 @@ import java.net.URL; import java.time.Duration; import java.util.List; +import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.ReentrantLock; import java.util.function.BiConsumer; @@ -61,25 +60,22 @@ public final class AppiumDriverLocalService extends DriverService { private static final Duration DESTROY_TIMEOUT = Duration.ofSeconds(60); private final File nodeJSExec; - private final ImmutableList nodeJSArgs; - private final ImmutableMap nodeJSEnvironment; - private final long startupTimeout; - private final TimeUnit timeUnit; + private final List nodeJSArgs; + private final Map nodeJSEnvironment; + private final Duration startupTimeout; private final ReentrantLock lock = new ReentrantLock(true); //uses "fair" thread ordering policy private final ListOutputStream stream = new ListOutputStream().add(System.out); private final URL url; private CommandLine process = null; - AppiumDriverLocalService(String ipAddress, File nodeJSExec, int nodeJSPort, - ImmutableList nodeJSArgs, ImmutableMap nodeJSEnvironment, - long startupTimeout, TimeUnit timeUnit) throws IOException { - super(nodeJSExec, nodeJSPort, nodeJSArgs, nodeJSEnvironment); + AppiumDriverLocalService(String ipAddress, File nodeJSExec, int nodeJSPort, Duration startupTimeout, + List nodeJSArgs, Map nodeJSEnvironment) throws IOException { + super(nodeJSExec, nodeJSPort, startupTimeout, nodeJSArgs, nodeJSEnvironment); this.nodeJSExec = nodeJSExec; this.nodeJSArgs = nodeJSArgs; this.nodeJSEnvironment = nodeJSEnvironment; this.startupTimeout = startupTimeout; - this.timeUnit = timeUnit; this.url = new URL(String.format(URL_MASK, ipAddress, nodeJSPort)); } @@ -114,7 +110,7 @@ public boolean isRunning() { } try { - ping(1500, TimeUnit.MILLISECONDS); + ping(Duration.ofMillis(1500)); return true; } catch (UrlChecker.TimeoutException e) { return false; @@ -127,10 +123,10 @@ public boolean isRunning() { } - private void ping(long time, TimeUnit timeUnit) throws UrlChecker.TimeoutException, MalformedURLException { + private void ping(Duration timeout) throws UrlChecker.TimeoutException, MalformedURLException { // The operating system might block direct access to the universal broadcast IP address URL status = new URL(url.toString().replace(BROADCAST_IP_ADDRESS, "127.0.0.1") + "/status"); - new UrlChecker().waitUntilAvailable(time, timeUnit, status); + new UrlChecker().waitUntilAvailable(timeout.toMillis(), TimeUnit.MILLISECONDS, status); } /** @@ -152,7 +148,7 @@ public void start() throws AppiumServerHasNotBeenStartedLocallyException { process.setEnvironmentVariables(nodeJSEnvironment); process.copyOutputTo(stream); process.executeAsync(); - ping(startupTimeout, timeUnit); + ping(startupTimeout); } catch (Throwable e) { destroyProcess(); String msgTxt = "The local appium server has not been started. " diff --git a/src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java b/src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java index dc9b669be..30147838e 100644 --- a/src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java +++ b/src/main/java/io/appium/java_client/service/local/AppiumServiceBuilder.java @@ -21,7 +21,6 @@ import static org.openqa.selenium.remote.CapabilityType.PLATFORM_NAME; import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -36,6 +35,7 @@ import org.openqa.selenium.Capabilities; import org.openqa.selenium.Platform; import org.openqa.selenium.os.ExecutableFinder; +import org.openqa.selenium.remote.Browser; import org.openqa.selenium.remote.BrowserType; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.service.DriverService; @@ -47,6 +47,7 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Path; import java.nio.file.Paths; +import java.time.Duration; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -87,9 +88,6 @@ public final class AppiumServiceBuilder private static final Function NODE_JS_NOT_EXIST_ERROR = (fullPath) -> String.format("The main NodeJS executable does not exist at '%s'", fullPath.getAbsolutePath()); - // The first starting is slow sometimes on some environment - private long startupTimeout = 120; - private TimeUnit timeUnit = TimeUnit.SECONDS; private static final List PATH_CAPABILITIES = ImmutableList.of(AndroidMobileCapabilityType.KEYSTORE_PATH, AndroidMobileCapabilityType.CHROMEDRIVER_EXECUTABLE, MobileCapabilityType.APP); @@ -116,8 +114,8 @@ public int score(Capabilities capabilities) { } String browserName = capabilities.getBrowserName(); - if (browserName.equals(BrowserType.CHROME) || browserName.equals(BrowserType.ANDROID) - || browserName.equals(BrowserType.SAFARI)) { + if (Browser.CHROME.is(browserName) || browserName.equals(BrowserType.ANDROID) + || Browser.SAFARI.is(browserName)) { score++; } @@ -277,21 +275,6 @@ public AppiumServiceBuilder withIPAddress(String ipAddress) { return this; } - /** - * Sets start up timeout. - * - * @param time a time value for the service starting up. - * @param timeUnit a time unit for the service starting up. - * @return self-reference. - */ - public AppiumServiceBuilder withStartUpTimeOut(long time, TimeUnit timeUnit) { - checkNotNull(timeUnit); - checkArgument(time > 0, "Time value should be greater than zero", time); - this.startupTimeout = time; - this.timeUnit = timeUnit; - return this; - } - @Nullable private static File loadPathFromEnv(String envVarName) { String fullPath = System.getProperty(envVarName); @@ -474,11 +457,12 @@ public AppiumServiceBuilder withLogFile(File logFile) { @Override protected AppiumDriverLocalService createDriverService(File nodeJSExecutable, int nodeJSPort, - ImmutableList nodeArguments, - ImmutableMap nodeEnvironment) { + Duration startupTimeout, + List nodeArguments, + Map nodeEnvironment) { try { - return new AppiumDriverLocalService(ipAddress, nodeJSExecutable, nodeJSPort, - nodeArguments, nodeEnvironment, startupTimeout, timeUnit); + return new AppiumDriverLocalService(ipAddress, nodeJSExecutable, nodeJSPort, startupTimeout, nodeArguments, + nodeEnvironment); } catch (IOException e) { throw new RuntimeException(e); } diff --git a/src/main/java/io/appium/java_client/touch/offset/ElementOption.java b/src/main/java/io/appium/java_client/touch/offset/ElementOption.java index ede90103c..775b067d1 100644 --- a/src/main/java/io/appium/java_client/touch/offset/ElementOption.java +++ b/src/main/java/io/appium/java_client/touch/offset/ElementOption.java @@ -6,7 +6,7 @@ import org.openqa.selenium.Point; import org.openqa.selenium.WebElement; -import org.openqa.selenium.internal.HasIdentity; +import org.openqa.selenium.remote.RemoteWebElement; import java.util.HashMap; import java.util.Map; @@ -84,9 +84,9 @@ public ElementOption withCoordinates(int xOffset, int yOffset) { public ElementOption withElement(WebElement element) { checkNotNull(element); checkArgument(true, "Element should be an instance of the class which " - + "implements org.openqa.selenium.internal.HasIdentity", - element instanceof HasIdentity); - elementId = ((HasIdentity) element).getId(); + + "extends org.openqa.selenium.remote.RemoteWebElement", + element instanceof RemoteWebElement); + elementId = ((RemoteWebElement) element).getId(); return this; } diff --git a/src/main/java/io/appium/java_client/windows/WindowsDriver.java b/src/main/java/io/appium/java_client/windows/WindowsDriver.java index 3c8126ac1..cf89449de 100644 --- a/src/main/java/io/appium/java_client/windows/WindowsDriver.java +++ b/src/main/java/io/appium/java_client/windows/WindowsDriver.java @@ -19,7 +19,6 @@ import static io.appium.java_client.remote.MobilePlatform.WINDOWS; import io.appium.java_client.AppiumDriver; -import io.appium.java_client.FindsByWindowsAutomation; import io.appium.java_client.HidesKeyboardWithKeyName; import io.appium.java_client.screenrecording.CanRecordScreen; import io.appium.java_client.service.local.AppiumDriverLocalService; @@ -32,8 +31,7 @@ import java.net.URL; public class WindowsDriver - extends AppiumDriver implements PressesKeyCode, HidesKeyboardWithKeyName, - FindsByWindowsAutomation, CanRecordScreen { + extends AppiumDriver implements PressesKeyCode, HidesKeyboardWithKeyName, CanRecordScreen { public WindowsDriver(HttpCommandExecutor executor, Capabilities capabilities) { super(executor, updateDefaultPlatformName(capabilities, WINDOWS)); diff --git a/src/main/java/io/appium/java_client/windows/WindowsElement.java b/src/main/java/io/appium/java_client/windows/WindowsElement.java index 4f7ec7ba2..ad5d3a5d8 100644 --- a/src/main/java/io/appium/java_client/windows/WindowsElement.java +++ b/src/main/java/io/appium/java_client/windows/WindowsElement.java @@ -16,8 +16,7 @@ package io.appium.java_client.windows; -import io.appium.java_client.FindsByWindowsAutomation; import io.appium.java_client.MobileElement; -public class WindowsElement extends MobileElement implements FindsByWindowsAutomation { +public class WindowsElement extends MobileElement { } diff --git a/src/main/java/io/appium/java_client/ws/StringWebSocketClient.java b/src/main/java/io/appium/java_client/ws/StringWebSocketClient.java index d7ebe559e..6a3148aa2 100644 --- a/src/main/java/io/appium/java_client/ws/StringWebSocketClient.java +++ b/src/main/java/io/appium/java_client/ws/StringWebSocketClient.java @@ -16,21 +16,21 @@ package io.appium.java_client.ws; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.WebSocket; -import okhttp3.WebSocketListener; - import java.net.URI; +import java.time.Duration; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; -import java.util.concurrent.TimeUnit; import java.util.function.Consumer; import javax.annotation.Nullable; -public class StringWebSocketClient extends WebSocketListener implements +import org.openqa.selenium.remote.http.ClientConfig; +import org.openqa.selenium.remote.http.HttpClient; +import org.openqa.selenium.remote.http.HttpMethod; +import org.openqa.selenium.remote.http.HttpRequest; +import org.openqa.selenium.remote.http.WebSocket; + +public class StringWebSocketClient implements WebSocket.Listener, CanHandleMessages, CanHandleErrors, CanHandleConnects, CanHandleDisconnects { private final List> messageHandlers = new CopyOnWriteArrayList<>(); private final List> errorHandlers = new CopyOnWriteArrayList<>(); @@ -65,37 +65,36 @@ public void connect(URI endpoint) { return; } - OkHttpClient client = new OkHttpClient.Builder() - .readTimeout(0, TimeUnit.MILLISECONDS) - .build(); - Request request = new Request.Builder() - .url(endpoint.toString()) - .build(); - client.newWebSocket(request, this); - client.dispatcher().executorService().shutdown(); + ClientConfig clientConfig = ClientConfig.defaultConfig() + .readTimeout(Duration.ZERO) + .baseUri(endpoint); // To avoid NPE in org.openqa.selenium.remote.http.netty.NettyMessages (line 78) + HttpClient client = HttpClient.Factory.createDefault().createClient(clientConfig); + HttpRequest request = new HttpRequest(HttpMethod.GET, endpoint.toString()); + client.openSocket(request, this); + onOpen(); setEndpoint(endpoint); } - @Override - public void onOpen(WebSocket webSocket, Response response) { + public void onOpen() { getConnectionHandlers().forEach(Runnable::run); isListening = true; } @Override - public void onClosing(WebSocket webSocket, int code, String reason) { + public void onClose(int code, String reason) { getDisconnectionHandlers().forEach(Runnable::run); isListening = false; } @Override - public void onFailure(WebSocket webSocket, Throwable t, Response response) { + public void onError(Throwable t) { getErrorHandlers().forEach(x -> x.accept(t)); } @Override - public void onMessage(WebSocket webSocket, String text) { + public void onText(CharSequence data) { + String text = data.toString(); getMessageHandlers().forEach(x -> x.accept(text)); } diff --git a/src/main/java/org/openqa/selenium/WebDriver.java b/src/main/java/org/openqa/selenium/WebDriver.java index 08de94859..c8f990896 100644 --- a/src/main/java/org/openqa/selenium/WebDriver.java +++ b/src/main/java/org/openqa/selenium/WebDriver.java @@ -21,14 +21,15 @@ import org.openqa.selenium.logging.Logs; import java.net.URL; +import java.time.Duration; import java.util.List; import java.util.Set; import java.util.concurrent.TimeUnit; /** - * The main interface to use for testing, which represents an idealised web browser. The methods in - * this class fall into three categories: + * WebDriver is a remote control interface that enables introspection and control of user agents + * (browsers). The methods in this interface fall into three categories: *