From 8e20f72c2976f0919abecda8845966e3c44d9f33 Mon Sep 17 00:00:00 2001 From: Jaromir Obr Date: 2025年8月24日 06:33:20 +0000 Subject: [PATCH] fix: use platformName for mobile click detection instead of isW3C (Android touchClick bug) --- lib/helper/WebDriver.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/helper/WebDriver.js b/lib/helper/WebDriver.js index 69793ab1c..cac9577ec 100644 --- a/lib/helper/WebDriver.js +++ b/lib/helper/WebDriver.js @@ -995,7 +995,7 @@ class WebDriver extends Helper { * {{ react }} */ async click(locator, context = null) { - const clickMethod = this.browser.isMobile && !this.browser.isW3C ? 'touchClick' : 'elementClick' + const clickMethod = this.browser.isMobile && this.browser.capabilities.platformName !== 'android' ? 'touchClick' : 'elementClick' const locateFn = prepareLocateFn.call(this, context) const res = await findClickable.call(this, locator, locateFn) @@ -1214,7 +1214,7 @@ class WebDriver extends Helper { * {{> checkOption }} */ async checkOption(field, context = null) { - const clickMethod = this.browser.isMobile && !this.browser.isW3C ? 'touchClick' : 'elementClick' + const clickMethod = this.browser.isMobile && this.browser.capabilities.platformName !== 'android' ? 'touchClick' : 'elementClick' const locateFn = prepareLocateFn.call(this, context) const res = await findCheckable.call(this, field, locateFn) @@ -1234,7 +1234,7 @@ class WebDriver extends Helper { * {{> uncheckOption }} */ async uncheckOption(field, context = null) { - const clickMethod = this.browser.isMobile && !this.browser.isW3C ? 'touchClick' : 'elementClick' + const clickMethod = this.browser.isMobile && this.browser.capabilities.platformName !== 'android' ? 'touchClick' : 'elementClick' const locateFn = prepareLocateFn.call(this, context) const res = await findCheckable.call(this, field, locateFn)

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