Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 #425

Open
sumayyashaji12 opened this issue Apr 9, 2024 · 1 comment

Comments

@sumayyashaji12
Copy link

Hi All,
I am facing the following issue while working on opening an application using robotframework in windows:
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.
I am using
python version - 3.11.9
Appium v2.5.1
Appium-Python-Client 2.11.1
decorator 5.1.1
docutils 0.20.1
kitchen 1.2.6
pip 24.0
robotframework 6.1.1
robotframework-appiumlibrary 2.0.0
robotframework-pythonlibcore 4.2.0
robotframework-selenium2library 3.0.0
robotframework-seleniumlibrary 6.2.0
selenium 4.11.2
six 1.16.0
This is the detailed code that i used in pycharm:
*** Settings ***
Library AppiumLibrary
Library AppiumLibrary
*** Variables ***
${ANDROID_PLATFORM_NAME} Android
${ANDROID_PLATFORM_VERSION} {ANDROID_PLATFORM_VERSION=34}
*** Test Cases ***
Open Test Application
Open Application http://127.0.0.1:4723/wd/hub udid=RFCR71HM8AP automationName=AndroidUiAutomator2 platformName=${ANDROID_PLATFORM_NAME} platformVersion=${ANDROID_PLATFORM_VERSION} app_id=jp.naver.line.android appActivity=jp.naver.line.android.activity.SplashActivity
Find Stickers
Click Element my_element
Wait Until Page Contains Element //*[@text="Stickers"]
The detailed error is as follows:
(base) (HP.DESKTOP-IK33RQ9) PS C:\Users\HP.DESKTOP-IK33RQ9\PycharmProjects\mobileapplication> robot -d output test\open_app.robot

Open App

[ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: No application is open
Open Test Application | FAIL |
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

[ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: No application is open
Find Stickers | FAIL |
No application is open

Open App | FAIL |
2 tests, 0 passed, 2 failed

Output: C:\Users\HP.DESKTOP-IK33RQ9\PycharmProjects\mobileapplication\output\output.xml
Log: C:\Users\HP.DESKTOP-IK33RQ9\PycharmProjects\mobileapplication\output\log.html
Report: C:\Users\HP.DESKTOP-IK33RQ9\PycharmProjects\mobileapplication\output\report.html
This error displayed in appium shell is given below:
[Appium] Welcome to Appium v2.5.1
[Appium] The autodetected Appium home path: C:\Users\HP.DESKTOP-IK33RQ9.appium
[Appium] Attempting to load driver uiautomator2...
[Appium] Requiring driver at C:\Users\HP.DESKTOP-IK33RQ9.appium\node_modules\appium-uiautomator2-driver\build\index.js
[Appium] AndroidUiautomator2Driver has been successfully loaded in 17.233s
[Appium] Appium REST http interface listener started on http://0.0.0.0:4723
[Appium] You can provide the following URLs in your client code to connect to this server:
[Appium] http://192.168.221.129:4723/
[Appium] http://127.0.0.1:4723/ (only accessible from the same host)
[Appium] Available drivers:
[Appium] - [email protected] (automationName 'UiAutomator2')
[Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use.
[HTTP] Request idempotency key: 55279579-902a-4204-981f-b303726328a5
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"appium:udid":"RFCR71HM8AP","appium:automationName":"AndroidUiAutomator2","platformName":"Android","appium:platformVersion":"{ANDROID_PLATFORM_VERSION=34}","appium:app_id":"jp.naver.line.android","appium:appActivity":"jp.naver.line.android.activity.SplashActivity"}}}
[HTTP] No route found for /wd/hub/session
[HTTP] <-- POST /wd/hub/session 404 17 ms - 211
[HTTP]
[Appium] Received SIGINT - shutting down
[AppiumDriver@0bd7] There are no active sessions for cleanup
[HTTP] Waiting until the server is closed
[HTTP] Received server close event

@zastress
Copy link
Contributor

This is not a bug. Starting with Appium 2, there is no more need to add /wd/hub in the url. Remove it and it should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants