serhatbolsu / robotframework-appiumlibrary

AppiumLibrary is an appium testing library for RobotFramework
Apache License 2.0
397 stars 291 forks source link

How to fix “request was received using an HTTP method that is not supported by the mapped resource” error #436

Open ps1logi opened 1 month ago

ps1logi commented 1 month ago

Hi All I'm new to Robot Framework I'm using VSCode as IDE and installing RobotCode - Language support for Robot Framework for Visual Studio Code as a Plugin.
When I ran the code below, I observed the error as WebDriverException: Message: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource

Code

*** Settings ***
Library AppiumLibrary
*** Variables ***
#Shared
${newCommandTimeout} 120
${eventTimings} true
${printPageSourceOnFindFailure} true
${appium_host} [http://172.23.230.134:4723/ 1](http://172.23.230.134:4723/) #port no to interact server mac

#Android

App Info
${app_Activity} com.logue.ui.activity.SplashActivity #app_activity
${app_Package} com.logue

Mobile and OS details
${platform_Name_Android} Android
${Android_OS} 14 #OS version
${Pixel_4a} R5CT126FWHA #Device Name
${ANDROID_AUTOMATION_NAME} UIAutomator2

*** Keywords ***
Open App Andriod
Open Application ${appium_host} appActivity=${app_Activity} appPackage=${app_Package} platformName=${platform_Name_Android} platformVersion=${Android_OS} newCommandTimeout=${newCommandTimeout} noReset=true automationName=${ANDROID_AUTOMATION_NAME}

*** Test Cases ***
Test to open android
Open App Andriod

Appium information Appium v2.6.0 xcuitest@7.24.1 [installed (npm)] uiautomator2@3.7.4 [installed (npm)] Vscode 1.86.2

VS Code Version Version: 1.86.2 (Universal) Commit: 903b1e9d8990623e3d7da1df3d33db3e42d80eda Date: 2024-02-13T19:42:13.651Z Electron: 27.2.3 ElectronBuildId: 26908389 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Darwin arm64 23.5.0

Python: 3.12.0 Nodejs: 22.2.0

pinnnkman commented 1 month ago

it looks like incompatible from appium server and appium-python-client, try to downgrade to appium server: 2.0.3