[ORG] RU-AXAV: refactor!: Migrate to Selenium 4 (#1531)#3
Merged
sakibguy merged 1 commit intosakibguy:masterfrom Oct 21, 2021
Merged
[ORG] RU-AXAV: refactor!: Migrate to Selenium 4 (#1531)#3sakibguy merged 1 commit intosakibguy:masterfrom
sakibguy merged 1 commit intosakibguy:masterfrom
Conversation
* 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 (SeleniumHQ/selenium@0aaa401#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`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BREAKING CHANGE:
io.appium.java_client.MobileDriverdo not extendorg.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.FindsByXPathinterfaces anymore because they were removed in Selenium Java client;io.appium.java_client.DefaultGenericMobileElementdo not implementorg.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.FindsByXPathinterfaces anymore because they were removed in Selenium Java client;String io.appium.java_client.remote.MobileOptions#getPlatformName()is removed in favor ofPlatform org.openqa.selenium.Capabilities#getPlatformName()io.appium.java_client.service.local.AppiumServiceBuilder#withStartUpTimeOutis removed in favor oforg.openqa.selenium.remote.service.DriverService.Builder#withTimeoutBREAKING CHANGE:
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.FindsByNsPredicatefindElements(String by, String using)andfindElement(String by, String using)fromio.appium.java_client.DefaultGenericMobileDriverandio.appium.java_client.DefaultGenericMobileElementbecause the originals of these methods are deprecated in SeleniumRemoteWebDriverandRemoteWebElementand throwUnsupportedOperationExceptionio.appium.java_client.MobileSelectoras it's used once, the string values from the enum are inlined inio.appium.java_client.MobileBy.javaThe change made in Selenium 4 (SeleniumHQ/selenium@0aaa401#r58091435)
broke Appium
class nameselector strategy. The workaround was implemented:MobileBy#className.AppiumDriver#substituteMobilePlatformBREAKING CHANGE: drop deprecated method
io.appium.java_client.AppiumDriver#substituteMobilePlatformChange list
Please provide briefly described change list which are you going to propose.
Types of changes
What types of changes are you proposing/introducing to Java client?
Put an
xin the boxes that applyDetails
Please provide more details about changes if it is necessary. If there are new features you can provide code samples which show the way they
work and possible use cases. Also you can create gists with pasted java code samples or put them here using markdown.
About markdown please read Mastering markdown and Writing on GitHub