-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
9.15.0 with typescript
Node.js Version
v22.14.0
Mode
WDIO Testrunner
Which capabilities are you using?
What happened?
I'm testing a hybrid mobile app built with Ionic, Angular, and Capacitor. I'm trying to execute a longPress() method on an element inside an iOS WebView, but I encounter an error when executing the action.
The version of appium-xcuitest-driver is 8.3.1. Even after upgrading to the latest version of the XCUITest driver, the error persists.
The same action works correctly on the Android version of the app. Since I can't access the element in the native context, I'm using browser.execute() with a JavaScript TouchEvent to perform the action manually.
What is your expected behavior?
If I use the longPress method, according to the documentation https://webdriver.io/it/docs/api/mobile/longPress,
I need to perform a long press on an element—just like on Android.
How to reproduce the bug.
export async function longPress(id: string) {
//get the element by selector ID
const element = await getElementById({ id: id });
//perform long press
await element.longPress({ duration: 10000 });
}
Relevant log output
Error: [0-0] WARN webdriver: WebDriverError: The XCUITest driver only supports W3C actions execution in the native context. Although, your W3C action contains one or more web elements, which cannot be automatically mapped to the native context. Consider mapping their absolute web coordinates to native context coordinates and passing them to your gesture instead.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