const { registerSuite } = intern.getInterface('object')
registerSuite('User', () => {
let remote
return {
before() {
remote = this.remote.get('index.html').setFindTimeout(1000)
remote.session.capabilities.touchEnabled = true
},
tests: {
'can click on the button and see the new block': () => (
remote
.findByCssSelector('#button')
.click()
.end()
.findByCssSelector('#block')
.sleep(1000)
)
}
}
})
Results
✓ chrome 67.0.3396.99 on Mac OS X - User - can click on the button and see the new block (1.509s)
No unit test coverage for chrome 67.0.3396.99 on Mac OS X
chrome 67.0.3396.99 on Mac OS X: 1 passed, 0 failed
‣ Created remote session chrome 67.0.3396.99 on Mac OS X (e558eabcf86096c7791c6e49f934c320)
× chrome 67.0.3396.99 on Mac OS X - User - can click on the button and see the new block (1.277s)
NoSuchElement: [POST http://localhost:4444/wd/hub/session/e558eabcf86096c7791c6e49f934c320/element / {"using":"css selector","value":"#block"}] no such element: Unable to locate element: {"method":"css selector","selector":"#block"}
(Session info: chrome=67.0.3396.99)
(Driver info: chromedriver=2.39.562713 (dd642283e958a93ebf6891600db055f1f1b4f3b2),platform=Mac OS X 10.13.5 x86_64)
Using
Current behavior
When I use the click() method on an element, nothing happen while it works normally on desktop mode.
How to reproduce
index.html
intern.json
test.js
Results