-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
browser.actions().click() does not work with async/await #4578
Comments
Have you tried the following? The reason why your work around works is because perform() and click() return promises. In you work around you do |
@Haseeb90 Thanks for your input, unfortunately it did not work. |
I have had a same problem. @pontusnyman thank you. Your work around worked. @Haseeb90 unfortunently it did not work. Using workflow, every thing was fine. Through using async/await, it was not. |
Hi everyone. |
any updates on this? My codebase is in limbo state due to this. |
@arjunUnniumbath You could always migrate back to using promises. That's what I've done in my project. The lack of this support is a deal breaker for me. Using
|
Hi, @pontusnyman ! Try this workaround. Hope it'll help you! |
Note: I am using a wrapper class for This is how I am doing it with async and await:
|
I'm doing this in an 'actions wrapper':
Which is lame sauce because the docs for ActionSequence.click() say:
Trying to move away from control flow as that seems like the recommended approach, this is an obstacle to that. |
Hi, exports.clickOnMiddle = (el) => {
|
came here after wasting half a day on browser.actions().dragAndDrop not working. @pontusnyman , thank you for reporting your workaround! The following works for me using Angular Material drag and drop :
Also, the async version works:
But change anything ever so slightly and it falls apart. Also, destination is found using css selector |
Hi,
I am converting my protractor tests from Promises to async/await and I found something weird with browser actions click. The problem is that the click() does not execute, but the mouseMove does.
The click() works when test is written as a promise not async/await
Here is the test and the browser.actions function
I found a workaround to get it to work.
Bug report
9.0.0
5.1.1
1.5.8
chrome
Selenium-docker
https://github.com/SeleniumHQ/docker-selenium
The text was updated successfully, but these errors were encountered: