Reputation: 129
I try automate testing mobile applications based on Appium. I've not found gui version for Appium beta there. How can i inspect elements in pages for my mobile apps using Appium? Appium version - 1.6.0-beta3
Upvotes: 2
Views: 8067
Reputation: 41
You can use uiautomatorviewer to inspect elements in your mobile application. Follow this path to find the uiautomatorviewer. C:\Users\AppData\Local\Android\android-sdk\tools
If not you can use the appium inspector session to find the elements of your mobile app. For that you have to follow the below steps As a pre condition, you need to have appium desktop client and emulator installed with your laptop.
Go to the emulator and move to the page what ever you want and then move back to the appium inspector window and click 'Refresh Source' icon and it will load the mobile view now you are in with your emulator.
Now in the inspector window in appium. using the 'select element' icon in top you can select the element and after selecting you need to click on 'tap' icon in the right side in the window. Now it will display all the available properties for the highlighted element.
Upvotes: 0
Reputation: 1194
You can inspect elements of ios simulator by using accessibility inspector from the xcode or you have to get pagesource and find the required elements.
You can use the ios inspector in the below link.
https://github.com/mykola-mokhnach/Appium-iOS-Inspector
Upvotes: 0
Reputation: 1186
There is other way you can inspect the label or accessibility layers in iphone simulator or real devices for the you need to enable inspector in your real device or simulator
Go to Setting -> General -> Accessibility -> Accessibility Inspector [On/Off]
Just switch on the "Accessibility Inspector".
Reference screenshot, how accessibility inspector look like,
Note : If you are unable to see the option means, please enable developer option in device and enable UI automation and try.
Upvotes: 0
Reputation: 149
Currently there is not a GUI inspector like there was for Appium 1.5. You can get the xml however by going:
System.out.println(driver.getPageSource());
From there you just need to interpret the xml and make your xpaths.
This will give you all the information you need to locate elements.
Upvotes: 1
Reputation: 6910
There are different ways you can inspect the elements of an application. First of all that depends on the platform you are using. For Android - UIAutomatorViewer is used and for iOS - Appium Inspector. UIAutomatorViewer is provided as a part of Android SDK manager and Inspector is provided with XCode.
Upvotes: 2