Appium + Robotframework for automated testing of Android applications-3: an essential tool introduction, appuim

Source: Internet
Author: User
Tags appium

Appium + Robotframework for automated testing of Android applications-3: an essential tool introduction, appuim

Everything is ready. Now we are about to write a test script.

However, an important problem has not been solved. We know that the RobotFramework mainly relies on the element id, name, or xpath in web pages to locate the elements on the page. We rely on the browser plug-in firepath to achieve this, but in Android applications, how to locate the elements on the page? Now, this key tool should be available, which is uiautomatorviewer. bat, which is located in the directory of % ANDROID_HOME % \ tools and double-click to run it.

If the simulator has not been started, start it up. When the simulator is started and the standby interface of the mobile phone appears, operate the simulator. Open the calculator, click number 6, and then click the multiplication number, click uiautomatorviewer. device Screenshot, the second icon in the upper left corner of bat, can be clicked on the simulator, but what's more amazing is that when we move the cursor to the element in, the attribute of the element is automatically displayed on the right, as shown in.

The resource-id, text, class attributes and resource-id attributes are often used in AppiumLibrary (which will be introduced later, isn't id frequently used in RobotFramework? Note: resource-id can be viewed only when the application version is set to 4.3 or later.

With this easy-to-use tool, it will be much easier to write code scripts.

 

To be continued, please stay tuned...

This article is copyrighted by the green tree. You are welcome to repost it, but please indicate the author and the source. It is strictly prohibited for any commercial use. Otherwise, you will be responsible for the consequences!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.