-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
How to access the WPF custom control's elements? #600
Comments
For your WPF custom control, you're using WindowsElement element = session.FindElementByClassName("GridControl"); But "GridControl" is in camel case on the AutomationElement class, and you are using Automation ID to access it. So we would recommend to try the following: WindowsElement element = session.FindElementByAccessibilityId("gridControl"); If that doesn't work, can you also provide the pagesource and a snapshot of Inspect.exe? Thanks |
Hi @hassanuz , Thanks for the update. We have checked with the accessibility id an its now working for this control. But, the same is not working for another control. Please find the requested details for that control, We have set the automation id in application level, Also, we have the requirement to access the GetItem method to access inner cell level like AutomationElement. Is it possible to expose any custom methods to provide the support to perform our operation in Appium? |
Hi @NeelakandanKannan, Please take a look at the workaround suggested on #629. |
The problem
Our custom control is designed in drawing architecture. i.e. every elements in a control are drawn using DeviceContext's Draw methods. We are not arranging elements as UI elements. To provide the accessibility support, we have provided the AutomationPeer support for control (not inner elements).
Can you please let us know how we can provide the testing support for inner elements to read using Appium?
We have tried the followings,
AutomationElement class provides support to access the inner elements.
While trying to access the WPF custom control, i m getting the following exception,
Exception details,
As like the above methods, can we get any solution to read the inner elements?
Environment
The text was updated successfully, but these errors were encountered: