Skip to content

Instantly share code, notes, and snippets.

@TuHuynhVan
Forked from maggiesavovska/actionsApi.txt
Created August 11, 2017 11:58
Show Gist options
  • Save TuHuynhVan/f0af49fddb0696751c77e2b8b7606148 to your computer and use it in GitHub Desktop.
Save TuHuynhVan/f0af49fddb0696751c77e2b8b7606148 to your computer and use it in GitHub Desktop.
Summary of sendKeys() and moveTo() Issues
Bunch of stuff broken? Don't fear..the Actions API is on it's way and it will probably be a good thing! Chin up!
OVERVIEW:
The purpose of this document is to explain the new actions API and what it has to do with certain commands
such as moveto and keys being depricated in webdriverio (due to them being deprecated in certain browser drivers).
MAIN ISSUE:
1. The issue is that these new drivers suppress these commands on purpose because they are deprecated,
but the drivers have not yet implemented the new WC3 standard called "actions API".
"The user-facing API for emulating complex user gestures. Use this class rather than using the Keyboard or Mouse directly."
See Here: https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/Actions.html
BROWSERS AFFECTED:
1. Safari: V. 5.1.7 and above including Safari 10 on macOS Sierra:
https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/4136
2. Firefox 51 --> 52 (possibly fixed in some ways in V53).
See here:
-https://github.com/mozilla/geckodriver/issues/233
-https://github.com/mozilla/geckodriver/issues/647
NOTE: As browsers continue to release new versions more browsers will be affected.
WHAT IS WEBDRIVERIO DOING ABOUT IT?
Once drivers implement the actions api webdriverio will implement it as well. Here are some issues for reference:
https://github.com/webdriverio/webdriverio/issues/1653
https://github.com/webdriverio/webdriverio/issues/2074
https://github.com/webdriverio/webdriverio/pull/2056
Quote from Christian:
"The moveTo is not part of the Webdriver spec and might be working in browser differently.
It will be deprecated soon and you should replace that command by using the Action API once it is implemented."
QUESTIONS:
1. What does this mean? Will the new actions api change how we are testing stuff?
- It depends on how each driver implements it, however, the new actions API will most likely be an improvement,
not a step back.
This is a great reference describing what the actions api entails:
https://github.com/SeleniumHQ/selenium/wiki/Advanced-User-Interactions
Here is the wc3 doc (see #17 Actions):
https://www.w3.org/TR/webdriver/#conformance
2. Is this really fixed in FF V53? Has someone had success using it?
- no, as far as we can tell it is not fixed in FF V53
PATCHES:
In the meantime JS has to be executed in the browser as a patch.
jquery keys patch courtesy of Thamu Gurung @thamu_gurung_twitter
https://gist.github.com/maggiesavovska/51eb0f826bec743f83c3cc8b25650dff#file-wdio-jquery-browser-patch-keys-js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment