Closed ArunRajaaSelvarajan closed 2 years ago
Is the destination element present in the page source?
Thanks @mykola-mokhnach . I tried adding the line of code (pageSource = driver.page_source) and all of sudden the script started working as expected. That was weird. I am able to see 'hello world' being passed to Text/Edit
from appium.webdriver.common.appiumby import AppiumBy from appium import webdriver
def step_impl(): desired_caps = { "automationName": "Mac2", "platformName": "Mac", "bundleId": "com.apple.TextEdit", "showServerLogs": True }
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
pageSource = driver.page_source
edit_field = driver.find_element(by=AppiumBy.CLASS_NAME, value='XCUIElementTypeTextView')
edit_field.send_keys('hello world')
But once the run is completed I am able to see an error thrown by Appium which is causing failure. Any idea how to solve this one.
Stacktrace: E UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy. Proxy error: Request failed with status code 400 E at getResponseForW3CError (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9) E at asyncHandler (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:380:37)
../Library/Python/3.10/lib/python/site-packages/selenium/webdriver/remote/errorhandler.py:247: WebDriverException
driver.quit() solved the above issue. Closing this issue
Hello,
I am trying to automate a mac desktop app using 'appium-mac2-driver' via PyCharm - Pytest where I am able to launch the application but not able to do any operations since I am getting 'no such element : unable to find an element' for a valid element locator. So I tried the example code given in the site to launch and sent text message to 'Text Edit' app. But still getting the same error message here as well. I have checked the element locator using 'Appium inspector' and it looks correct. Not sure where I am going wrong.
Code:
I have completed the below requirements in my mac(Big Sur - 11.6):
Stacktrace:
Kindly provide some guidance to sort out this issue.