[ORG] RU-AXAV: refactor!: Migrate to Selenium 4 (#1531) #3
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