-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
NoSuchElementError encountered in CI environment but working on local machine #282
Comments
I realised that the Identifier attribute used in Xpath for the element has changed when I print the page source of the app in the Jenkins VM environment. Is the XC Identifier attribute not unique and changes across different machines? I tested xpath with a title attribute for the element which does not change across environments, but am still the driver is not able to find the element even though the xpath of the element is valid and found in I can see this printed in the logs on the VM: |
Hi, after more debugging by remote desktop into the Jenkins VM, I realised the Appium logs is getting stuck at this line:
I logged errors from my python script, and received this:
Any idea why the application is identified as damaged or incomplete, even though Mac2 driver is able to launch it? |
Maybe the system log has more info. The error might came from the XCTest framework's
https://developer.apple.com/documentation/xctest/xcuiapplication/2873317-activate |
Is there a reason why the Mac2 driver may throw
NoSuchElementError: unable to find an element using 'xpath', value '//XCUIElementTypeButton[@elementType="9" and @identifier="_NS:291"]'
in the CI environment (specifically, running on an ECS VM with GUI in Jenkins), but the driver able to locate the element using the same XPath when I run the script locally on my Mac?The Jenkins node is able to locate certain Xpaths but not others as seen in logs where some status codes are 200 while others are 404. This is the environment I am running Mac2 driver on:
Here are the Appium logs on the VM:
The text was updated successfully, but these errors were encountered: