-
-
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
Can't find any labels using XCUIElementTypeStaticText #196
Comments
It's possible that |
I've tried following your suggestion in a couple of ways. 1 my_label = driver.find_element(by=AppiumBy.CLASS_NAME, value='XCUIElementTypeStaticText')
assert(my_label.value == "Hello, world!") Produces this error message
2 my_label = driver.find_element(by=AppiumBy.CLASS_NAME, value='XCUIElementTypeStaticText')
assert(my_label.get_attribute('text') == "Hello, world!") Produces this error message
|
did you try
? |
my_label = driver.find_element(by=AppiumBy.CLASS_NAME, value='XCUIElementTypeStaticText')
assert(my_label.get_attribute('value') == "Hello, world!") Produces this error:
Which is weird, it looks like |
That doesn't seem right unless your app has accessibility text configured incorrectly. @mykola-mokhnach I'm not sure where to go from here given I don't use this driver. Any ideas on your end? |
I don't see any issues there. We display exactly what XCTest returns to us. If some values are not present then either a wrong element is located or XCTest fetches unexpected values for it |
The app I'm testing is just Xcode's macOS App template, but it's as bare-bones as can be (except for the TextField I've added but which really shouldn't be interfering) Are you able to reproduce the issue? Here's the small demo app: |
@jlipps @mykola-mokhnach following up on this 😃 I was wondering if you were able to reproduce the issue? Or have any suggestions as to why the |
I'm trying to assert that the text in the label says "Hello, world!"
This fails with the following error:
But the textfield is definitely in the page source!
Here's the very small demo app I'm trying to test:
https://github.com/arielelkin/macostestapp
The text was updated successfully, but these errors were encountered: