Click (or other Webdriver actions) not available on returned elements
See original GitHub issueclick() (and all other webdriver methods) are not available on a returned element. Otherwise Webdriver seems to be working properly. Am I doing something wrong?
Note I’m not using APP.client.click('button')
because I want to click the SECOND button. (Also, I’m having all sorts of problems getting xPath or CSS selectors to directly access the second button to work.)
const btns = await APP.client.$$('button')
console.log(JSON.stringify(Object.getOwnPropertyNames(btns[0])))
["ELEMENT","element-6066-11e4-a52e-4f735466cecf","value","selector","index"]
btns[1].click()
TypeError: btns[1].click is not a function
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:6
Top Results From Across the Web
Selenium - Java - Element gets click but does not action
Does it perform the action when you click manually? If it "seems" to click it in the test, it means that your test...
Read more >Solutions to The Click Problem With Selenium & Java
Examine 7 different solutions you can use in the click problem - one of the most fundamental problems you may encounter during UI...
Read more >How To Deal With "Element is not clickable at point” Exception ...
Solution 4: Using Actions class in Selenium The exception “Element is not clickable at point” might be thrown when the element is not...
Read more >Button element found but click() action not performed
Issue was there were more buttons with given css selector variables.So when executing selenium could not find the exact elements.
Read more >Check Visibility of Web Elements Using Various Types ...
So let us start with a brief introduction – WebDriver has a W3C ... on the web page and a “false” value if...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is because spectron uses
webdriverio < v5.0.0
.Check out the changelog for more infos: https://github.com/webdriverio/webdriverio/blob/master/CHANGELOG.md#v500-2018-12-20
Thanks for the comment @HaNdTriX , I was banging my head against the wall figuring out why none of the APIs in the WebDriverIO docs were working with Spectron.
Maybe the Spectron docs should make a note of this and not link directly to the most up-to-date version of the WebDriverIO docs?
===
Link to v4 WebDriverIO docs if anybody was looking:
http://v4.webdriver.io/api.html