Skip to content

Upgrade to Selenium 3.14.0 - #992

Merged
SrinivasanTarget merged 1 commit into
appium:masterfrom
valfirst:upgrade-to-selenium-3-14
Aug 7, 2018
Merged

SrinivasanTarget merged 1 commit into
appium:masterfrom
valfirst:upgrade-to-selenium-3-14

Conversation

@valfirst

@valfirst valfirst commented Aug 4, 2018

Copy link
Copy Markdown
Collaborator

Change list

Upgrade to Selenium 3.14.0

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)

public AppiumCommandExecutor(Map<String, CommandInfo> additionalCommands,
URL addressOfRemoteServer) {
this(additionalCommands, addressOfRemoteServer, new AppiumHttpClientFactory());
this(additionalCommands, addressOfRemoteServer, HttpClient.Factory.createDefault());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to revert that?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue was fixed in Selenium: SeleniumHQ/selenium@550cd0c, so no reason to keep this workaround

*/
public static Map.Entry<String, Map<String, ?>> replaceElementValueCommand(
HasIdentity hasIdentityObject, String value) {
RemoteWebElement hasIdentityObject, String value) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is HasIdentity interface removed from the API? I anyway would prefer to have an interface/abstract entity here rather than a real class

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's scheduled for deletion with no replacement (SeleniumHQ/selenium@3665dd7#diff-15f3fec0ac0daf8e622a9724f94246e4).

Selenium maintainers replaced HasIndentity with RemoteWebElement: SeleniumHQ/selenium@3665dd7#diff-ff3a05d3dabdcb64c0729823366f4b10. I tried to follow the same pattern.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strange decision...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@valfirst Can we rename the object to remoteWebElement?

.build();
final Map<String, Object> expectedOpts = new HashMap<>();
expectedOpts.put("element", ((HasIdentity) DUMMY_ELEMENT).getId());
expectedOpts.put("element", ((RemoteWebElement) DUMMY_ELEMENT).getId());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

such cast is probably redundant if DUMMY_ELEMENT is already RemoteWebElement

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DUMMY_ELEMENT is declared as:
private static final WebElement DUMMY_ELEMENT = new DummyElement();

I can change variable type to RemoteWebElement or DummyElement, but I need to revise the logic of other tests, because it could be done intentionally to cover some logic.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

io.appium.java_client.touch.offset.ElementOption#withElement contains type check and type casting logic, so it looks like such declaration is a way to test the method logic.

@valfirst
valfirst force-pushed the upgrade-to-selenium-3-14 branch from f35b94e to 58afd18 Compare August 6, 2018 19:59
@SrinivasanTarget
SrinivasanTarget merged commit 24cec01 into appium:master Aug 7, 2018
@valfirst
valfirst deleted the upgrade-to-selenium-3-14 branch July 7, 2019 17:42
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.

3 participants