-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Closed
Copy link
Labels
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
9.21.0
Node.js Version
v20.10.0
Mode
Standalone Mode
Which capabilities are you using?
{
'perfecto:automationName': 'PerfectoMobile',
'perfecto:platformName': 'iOS',
'perfecto:model': 'iPhone-16',
'perfecto:browserName': '',
'perfecto:securityToken': "your security token"
}What happened?
Perfecto automatically converts the command from executeScript into one line. This means you must not send commands that have single line comments. Esbuild introduced a change in 0.23.1 that preserves comments in switch statements and other expressions. This caused isElementDisplayed and isElementClickable to have single line comments.
What is your expected behavior?
webdriverio/build/scripts/isElementDisplayed.js and webdriverio/build/scripts/isElementClickable.js should not have single line comments.
How to reproduce the bug.
import { remote } from 'webdriverio'
const browser = await remote({
loglevel: 'trace',
hostname: 'your_cloud_name.perfectomobile.com',
path: '/nexperience/perfectomobile/wd/hub',
port: 443,
protocol: 'https',
capabilities: {
'perfecto:automationName': 'PerfectoMobile',
'perfecto:platformName': 'iOS',
'perfecto:model': 'iPhone-16',
'perfecto:browserName': '',
'perfecto:securityToken': 'your security token'
}
})
// Open an app on the device
await browser.$(theLocator).isDisplayed()Relevant log output
DEBUG webdriver: request failed due to status 13
ERROR webdriver: WebdriverError: Failed to execute command webpage execute: executeScript command failed. Reason: handset server: cannot recompile script/function when running "execute/sync" with method "POST"Code of Conduct
- I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues
Reactions are currently unavailable