Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f02280c

Browse files
authored
fix: use platformName for mobile click detection instead of isW3C (Android touchClick bug) (#5107)
1 parent 0a0067f commit f02280c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎lib/helper/WebDriver.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ class WebDriver extends Helper {
995995
* {{ react }}
996996
*/
997997
async click(locator, context = null) {
998-
const clickMethod = this.browser.isMobile && !this.browser.isW3C ? 'touchClick' : 'elementClick'
998+
const clickMethod = this.browser.isMobile && this.browser.capabilities.platformName!=='android' ? 'touchClick' : 'elementClick'
999999
const locateFn = prepareLocateFn.call(this, context)
10001000

10011001
const res = await findClickable.call(this, locator, locateFn)
@@ -1214,7 +1214,7 @@ class WebDriver extends Helper {
12141214
* {{> checkOption }}
12151215
*/
12161216
async checkOption(field, context = null) {
1217-
const clickMethod = this.browser.isMobile && !this.browser.isW3C ? 'touchClick' : 'elementClick'
1217+
const clickMethod = this.browser.isMobile && this.browser.capabilities.platformName!=='android' ? 'touchClick' : 'elementClick'
12181218
const locateFn = prepareLocateFn.call(this, context)
12191219

12201220
const res = await findCheckable.call(this, field, locateFn)
@@ -1234,7 +1234,7 @@ class WebDriver extends Helper {
12341234
* {{> uncheckOption }}
12351235
*/
12361236
async uncheckOption(field, context = null) {
1237-
const clickMethod = this.browser.isMobile && !this.browser.isW3C ? 'touchClick' : 'elementClick'
1237+
const clickMethod = this.browser.isMobile && this.browser.capabilities.platformName!=='android' ? 'touchClick' : 'elementClick'
12381238
const locateFn = prepareLocateFn.call(this, context)
12391239

12401240
const res = await findCheckable.call(this, field, locateFn)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /