Appium+python quickly installs apps to the real machine

Source: Internet
Author: User

#coding =utf-8
From AppiumImport Webdriver
From timeImport Sleep
Import Os,time,unittest

"How to quickly install apps for your phone"

Path=Lambda P:os.path.abspath (Os.path.join (Os.path.dirname (__file__), p))

Desired_caps ={}
desired_caps[' Device '] =' Android '#系统
desired_caps[' PlatformName '] =' Android '
desired_caps[' Version '] =' 4.1.1 '#系统版本
desired_caps[' devicename '] =' HTC s720t '#机器型号
desired_caps[ Automationname '] = #版本小于4.2.2 (API17) All need to specify Selendroid
#desired_caps [' app '] = PATH (' d:\\jinritoutiao_545.apk ')
Desired_caps[ ' app ' = PATH ( "D: \\weixin_ 780.apk ') #被测试app在电脑上的位置

Dr = Webdriver. Remote ( ' Http://localhost:4723/wd/hub ', desired_caps)

Sleep (5)
Dr.quit ()

Appium+python quickly install apps to a real machine

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.