Comments (4)
If you do the following it should get the desired behavior:
// modifier keys are supposed to be sticky across multiple calls when using keyboard.sendKeys:
// https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidkeys
await driver.keyboard.sendKeys(Keyboard.control);
// element.click() might work, but I am not sure that it is guaranteed to keep the keyboard state as it
// part of the "do as I mean" API not the "do as I say" API.
await driver.mouse.click(element);
// a second call to the same modifier key releases it:
// https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidvalue
await driver.keyboard.sendKeys(Keyboard.control);
If this doesn't work, it indicates a bug in the remote end, not a bug in webdriver.dart.
As for the /actions endpoint, no remote ends implement yet (although marionette/geckodriver will hopefully do so soon). When it is available in some endpoint, we will see about implementing it here.
from webdriver.dart.
sendChord doesn't help, as we should hold ctrl and click by mouse, sendChord, as I can understand, sending only "ctrl+a" key codes and not holding key modificators.
from webdriver.dart.
I would also really appreciate this functionality. Looks like we need to add support for 17.5 Perform Actions, which is a bit more clearly described in https://github.com/SeleniumHQ/selenium/wiki/Advanced-User-Interactions.
And here's a python Action Chains API, for comparison. EDIT: Looking at the underlying code, I don't think the python ActionChains are actually using the Actions API.
It seems even the java code doesn't use the /actions
endpoint, so I guess we're all just waiting for the spec to finalize a bit more before fully implementing?
from webdriver.dart.
Thanks for the code, that works (in Chrome) with a tweak (driver.mouse.click()
doesn't take an element, it takes an optional mouse button). I tested with SauceLabs in Chrome on Windows and Mac and it worked great. Firefox and IE11 on Windows both don't support the moveTo
command, so dice there, unfortunately.
from webdriver.dart.
Related Issues (20)
- Snippets of example code needs expanded into finders, sendKeys, and assertions.
- is this package supporting latest webdriver spec? HOT 3
- Add kevmoo as an admin HOT 1
- WebDriverException launching w3c spec driver
- Are there classes to work with html select? HOT 2
- ChromeDriver 80.0.3987.16 doesn't seem to start properly HOT 3
- SessionNotCreatedException throws when the Port is already in Use HOT 3
- Can't create driver: WebDriverException (405): Error parsing response body: HTTP method not allowed
- Add valid copyright information instead of placeholder HOT 1
- Webdriver can't return shadowRoot (as SearchContext) in Chrome96+
- Unable to be used by flutter driver within GitHub actions
- `waitFor` can return `Future<T>`
- 👋 From the Selenium project!
- Need to add a delay between calls to `createDriver` and `driver.get`
- remove the dep on package:archive
- Remove the dependency on `package:matcher`
- Use case: use appium or even selenium to test Flutter apps reliably using webdriver w3c protocol
- Support querying current webdriver timeouts HOT 1
- Any plans for Selenium Manager support?
- failing tests when run against firefox
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webdriver.dart.