Repository navigation
Error when taping or clicking on Appium + expo #4618
Copy link
Copy link
Closed
Description
Provide console output if related. Use
--verbosemode for more details.
**************************************
nodeInfo: 20.11.0
osInfo: macOS 14.6.1
cpuInfo: (12) arm64 Apple M2 Pro
chromeInfo: 131.0.6778.86
edgeInfo: Not Found
firefoxInfo: undefined
safariInfo: 17.6
If you need more detailed info, just run this: npx codeceptjs info
***************************************
CodeceptJS v3.6.7 #StandWithUkraine
Using test root "/Users/dohainam/Desktop/Projects/react-native/Test.xyz"
Helpers: Appium
Plugins: screenshotOnFail, tryTo, retryFailedStep, retryTo, eachElement
login --
[1] Starting recording promises
Timeouts:
test something
I see app is installed "com.anonymous.Test"
I wait for element "//android.widget.Button[@content-desc="TEST"]"
I tap "~TEST"
[1] Error (Non-Terminated) | Error: WebDriverError: Request with GET/HEAD method cannot have body. when running "touch/perform" with method "GET" and args "{"actions":[{"action":"tap","options":{"element":"00000000-0000-00a8-ffff-ffff0000000c"}}]}" | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error | Error: WebDriverError: Request with GET/HEAD method cannot have body. when running "touch/perform" with method "GET" and args "{"actions":[{"action":"tap","options":{"element":"00000000-0000-00a8-ffff-ffff0000000c"}}]}" undefined...
[1] <teardown> Stopping recording promises
› <screenshotOnFail> Test failed, try to save a screenshot
› Screenshot has been saved to /Users/dohainam/Desktop/Projects/react-native/test.xyz/output/test_something.failed.png
✖ FAILED in 1054ms
[2] Starting recording promises
-- FAILURES:
1) login
test something:
WebDriverError: Request with GET/HEAD method cannot have body. when running "touch/perform" with method "GET" and args "{"actions":[{"action":"tap","options":{"element":"00000000-0000-00a8-ffff-ffff0000000c"}}]}"
at FetchRequest._libRequest (file:///Users/dohainam/Desktop/Projects/react-native/test.xyz/node_modules/webdriver/build/index.js:1480:13)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async FetchRequest._request (file:///Users/dohainam/Desktop/Projects/react-native/test.xyz/node_modules/webdriver/build/index.js:1381:20)
at async Browser.wrapCommandFn (file:///Users/dohainam/Desktop/Projects/react-native/test.xyz/node_modules/@wdio/utils/build/index.js:884:23)
at async Browser.wrapCommandFn (file:///Users/dohainam/Desktop/Projects/react-native/test.xyz/node_modules/@wdio/utils/build/index.js:884:23)
Provide test source code if related
Feature("login");
Scenario("test something", ({ I }) => {
I.seeAppIsInstalled("com.anonymous.Test");
I.waitForElement('//android.widget.Button[@content-desc="TEST"]');
I.tap('//android.widget.Button[@content-desc="TEST"]');
});Details
- CodeceptJS version:^3.6.7
- NodeJS Version:v20.11.0
- Operating System: MacOS
- webdriverio: ^9.3.1
- Configuration file:
# paste config here
import { setHeadlessWhen, setCommonPlugins } from "@codeceptjs/configure";
// turn on headless mode when running with HEADLESS=true environment variable
// export HEADLESS=true && npx codeceptjs run
setHeadlessWhen(process.env.HEADLESS);
// enable all common plugins https://github.com/codeceptjs/configure#setcommonplugins
setCommonPlugins();
export const config = {
tests: "./*_test.ts",
output: "./output",
helpers: {
Appium: {
platform: "Android",
desiredCapabilities: {
app: "./android/app/build/outputs/apk/release/app-release.apk",
platformName: "android",
"appium:deviceName": "Android_phone", // Change to the name of the AVD you're using
"appium:automationName": "UiAutomator2",
"appium:platformVersion": "12",
"appium:appPackage": "com.anonymous.Test",
// "appium:appActivity": "com.anonymous.Test.activities.MainActivity"
},
appiumV2: true,
},
},
include: {
I: "./steps_file",
},
name: "hello.xyz",
};Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
jprodriguez-sw commentedon Nov 28, 2024
wdio
touchPerformis deprecated. You have to useactioninstead. https://webdriver.io/docs/api/browser/action/I was having the same issue with this code.
So I had to replace it with this:
Btw I'm using wdio + appium + uiautomator2
jurecotic commentedon Dec 4, 2024
Got the same issue. Tried with webdriver 8 and 9. @jprodriguez-sw yeah that works, but we are not doing a touchPerform action. We are doing a tap action in Codecept. At least updating the documentation that tap action is not supported anymore would save me some time...
MaksimPryvolnev commentedon Apr 2, 2025
It works for me, it made my day
mirao commentedon Aug 22, 2025
@kobenguyent Not sure it's correct that this bug is closed because #5035 is still open.
Anybody if you have this issue while using WebDriverIO 9.x, use this workaround:
Patch your Appium.js: Replace
return this.browser.touchPerform(actions)byreturn this.browser.performActions(actions)inCodeceptJS/lib/helper/Appium.js
Lines 1360 to 1363 in ce16e92
and use the new parameters for
performActions()in tests, e.g.This is how it works for me.