Skip to content

Conversation

@sakibguy
Copy link
Owner

  • 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

Change 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 x in the boxes that apply

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Details

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

* 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`
@sakibguy sakibguy self-assigned this Oct 21, 2021
@sakibguy sakibguy merged commit 414f5ca into sakibguy:master Oct 21, 2021
@sakibguy sakibguy changed the title refactor!: Migrate to Selenium 4 (#1531) RU-AXAV: refactor!: Migrate to Selenium 4 (#1531) Dec 31, 2022
@sakibguy sakibguy changed the title RU-AXAV: refactor!: Migrate to Selenium 4 (#1531) [ORG] RU-AXAV: refactor!: Migrate to Selenium 4 (#1531) Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants