Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

(VI) use of appium 1.6and APP-inspector positioning

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Abandon uiautomation from 1.6th

Switch to xcuiteest mechanism

Environmental fundamentals: above xcode8,ios9.3

1. Install the latest version 1.6.3

Install cnpm: npm install-g cnpm-- registry= https://registry.npm.taobao.org

Install appium1.6.3: cnpm install-g appium@1.6.3

two。 Install appium-xcuitest-driver dependencies

Enter the WebDriverAgent installation directory: cd / usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent

Run bootstrap:

Mkdir-p Resources/WebDriverAgent.bundle sh. / Scripts/bootstrap.sh-d

3. Change the script configuration:

Add this apabilities

AutomationName, "XCUITest"

Source text: https://testerhome.com/topics/6962

New positioning tool: https://macacajs.github.io/app-inspector/cn/

App Inspector is a mobile device UI viewer running on the browser side, which uses the tree state structure to view the UI layout, and can automatically generate XPath, which is convenient for script writing and generation.

Installation

$npm install app-inspector-g (it will be slow to install directly, change this command: npm install app-inspector-g-- registry= https://registry.npm.taobao.org)

Use

$app-inspector-u YOUR-DEVICE-ID

Attachment: use instruments-s to get all current equipment information

After the operation, as shown in the following figure

(1)

(2) automatically open the interface shown in figure 2 above in the browser, and check its attributes, name,class,xpath, etc., by selecting the element on the left.

The original appium 1.5 positioning is mainly based on xpath, but the positioning effect is poor with name,class_name and so on.

The success rate of localization such as name,class_name in appium 1.6is high, and xpath is almost no longer used.

Http://www.cnblogs.com/hyddd/p/5571229.html Macaca is a lightweight Appium. You can try this.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report