Appium inspector for iOS 10?

十年热恋 提交于 2019-12-04 05:54:18

问题


Until now, i was using Xcode 7.X with Appium 1.4/1.5.X to automate iOS 9.X apps. Now, to automate iOS 10, i installed Xcode 8 with Appium 1.6.0 beta. The automation succeeds, but the problem is that Appium 1.6.0 beta only has a cli version that, of course, doesn't include Inspector to inspect app elements.

My question is: Is there an equivalent for the Appium inspector to inpect element on iOS 10?


回答1:


There are two ways to inspect the elements for ios 10 using appium 1.6.

  1. You can get the XML of the page you want to inspect the elements by using

    driver.getPageSource();
    

now you need to search for the elements in the XML and build XPath or other locators on your own.

  1. You can try Accessibility Inspector tool which comes with the Xcode to inspect the elements.To open Accessibility Inspector, click on Xcode and then in open developer tool you will find Accessibility Inspector.

  2. You can use the inspector in the below link.Read the instructions in the link to know how to use it.

https://github.com/mykola-mokhnach/Appium-iOS-Inspector




回答2:


I believe that they haven't thought of any way of doing this, You can refer to the comment [@baliand I'm not aware of any way to do that]from an Appium member regarding the un-supported iOS version in case of iOS 10. refer to the link : https://github.com/appium/appium/issues/6860




回答3:


Here is how you could do this:

  1. Use Appium app(1.5.3) but do not start appium server.
  2. Start Appium 1.6 server from command line using node.
  3. Press on Appium (1.5.3) inspector.

Cheers




回答4:


You can try Appium Desktop app version 1.0 that comes with Appium 1.6.4 beta

You can download it for mac and windows platform from following link

https://github.com/appium/appium-desktop/releases/tag/v1.0.0-beta.2

Once you start appium session with Appium desktop app you can also use following inspector to get xpath.

https://github.com/mykola-mokhnach/Appium-iOS-Inspector




回答5:


Best and easiest solution would be ask the developer to set Accessibility Identifier for each view and you this like Id and you don't have to use Xpath at atll



来源:https://stackoverflow.com/questions/39487603/appium-inspector-for-ios-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!