Android Simulator (genymotion) +appium+python Framework Execution Fundamentals (currently written by the company)

Source: Internet
Author: User
Tags openid appium

Android Emulator (genymotion) +appium+python Framework performs the basic process:

1. Push.initdate (OpenID) method//Business Data initialization

1.1 v5db.push_to_db (filename, OpenID)///by executing the SQL statement in the filename file to initialize the business data, such as physically deleting orders, to ensure that automated execution fails for data reasons

2, Android.Android.init_Android (self)//Initialize Android simulator

classandroid:definit_android (self):Try: Desired_caps={} desired_caps['devicename'] ='Device'desired_caps['PlatformName'] ='Android'desired_caps['platformversion'] ='4.3'desired_caps['app'] = PATH ('d:\\workspace\\projectname_app_appium_test\ProjectNameapp\\agent4.0.0_test.apk')
desired_caps['Apppackage'] ='com.***.finance.agent'
desired_caps['appactivity'] ='com.***.finance.agent.luncheractivity'
desired_caps['Unicodekeyboard'] ='True'
desired_caps['Resetkeyboard'] ='True'
  
returnDesired_caps

exceptException,ex:

PrintEx

3, the web. Web.webpath (self, androidmap)//Plug the app-related information onto the appium running on the remote virtual machine to get the desired driver

  Driver = Webdriver. Remote (' Http://127.0.0.1:4723/wd/hub ', Androidmap)

4, Push.controller (Driver)//formally start the execution of case

4.1 Read the case map and map out the description

4.2 If execution case can be matched to in the mapping table, the contents of the file are read by row, and case content is processed

Process case content, get the required parameters for execution 1) Ids_key->ids: Element ID 2) Ele_type: Element type 3) Input_value: Input 4) Msg: Step description Information 5) Assert_message: Checksum information

4.3 Call push.fillelement (driver,ids,ele_type,input_value,msg,assert_message)//Locate the element and manipulate it

4.3.1 positioning elements

4.3.2 Manipulating elements

4.3.3 Push.checkresut (Driver, Times, MSG, assertmsg, Input_value)//write element operation log

5, case file execution complete, driver. Quit ()//Close Driver

6. Push.loginfo (time)//Output Case test report

Android Simulator (genymotion) +appium+python Framework Execution Fundamentals (currently written by the company)

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.