程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

[Python app automation test practice chapter ⑤] - detailed explanation of appium capability

編輯:Python
Wanyeji Faint thunder , Cloudy sky . But I hope the wind and rain will come , I can keep you here .


Preface
Author's brief introduction : Husky who yearns for power , You can call me Siberian Husky , One devoted to TFS - The whole stack Empowered bloggers
CSDN Blog expert certification 、 Nova plan Season 3 full stack track top_1 、 Huawei cloud sharing expert 、 Alibaba cloud expert Blogger
If there is something wrong with the knowledge of the article , Please correct me. ! Learn with you , Progress together
The motto of life : Being superior to some other man , Is not high , The true nobility is to be superior to one's former self .
If you feel the blogger's article is good , Please pay attention. 、 give the thumbs-up 、 Collect three companies to support bloggers


Column series ( Click unlock ) Learning route guidance Knowledge orientation Python Full stack white paper Zero foundation beginner level chapter Easy to get started in an easy to understand way , Let you fall in love with Python The charm of . Advanced Grammar Mainly around multi-threaded programming 、 Regular expression learning 、 Including project exercises close to actual combat . Office automation Realize the automatic operation of daily office software , Save time 、 Improve office efficiency . Automation test practice From the perspective of actual combat , One step ahead , Rapid transformation test development engineer . Database development practice Updating Introduction and practice of reptile Updating Data analysis Updating Introduction to the front +flask Full stack Updating django+vue Full stack Updating expand - Introduction to artificial intelligence Updating The road to network security Stepping on a pit Record the pit encountered during learning and drilling , It is convenient for those who come from behind to catch up Net security literacy Three days fishing , No deep understanding of the principle , It will only make you a script boy . vulhub The loopholes in the shooting range reappear Make it easy to reproduce vulnerabilities , Let security researchers focus more on the vulnerability principle itself . shell Programming Don't involve linux Basics , The final case will be in the direction of safety reinforcement . [ To be finished ] WEB Vulnerability attack and defense 2021 year 9 month 3 Stop updating on , Move to safe communities such as prophet community and small secret circles Collection of penetration tools 2021 year 9 month 3 Stop updating on , Move to safe communities such as prophet community and small secret circles A little Engineer Test artifact - Charles Software test data packet capture analysis artifact Test artifact - Fiddler Learn to fiddle , Learn not to stand upside down and eat , Rarefied ! Test artifact - Jmeter Not just a performance test artifact , It can also be used to build a lightweight interface automation testing framework . RobotFrameWorkPython Automatic test tool realized , This chapter only introduces UI Automation part . Java Realization UI automation Document written in 2016 year ,Java Realized UI automation , It still has reference significance . MonkeyRunner There are not many application scenarios for this tool at present , The document has been deleted , Only for the sake of good typesetting .


List of articles

    • What is? Capability
    • Capability Configuration explanation

We are app Automated testing and web Between automated tests , One big difference is the way you start up . Selenium Start up web Only one is needed for automation driver that will do , however app Automation is like a lot of equipment information .( Just like the case of accessing the address book in the previous chapter , Before accessing the address book , Many startup parameters are set , In fact, these are appium It needs to be carried when starting Capability Device information for .)

according to Capability We can find that it is a dictionary data style , as follows :

desired_caps = {
} # Definition desired_caps Variable , Used to assign a lot of startup information 
desired_caps['platformName'] = 'Android' # Equipment name 、 System is "Android"
desired_caps['platformVersion'] = '7.1.2' # Here is the setup center of the night God simulator to view the Android version "7.1.2" , Later, I will tell you how to switch versions 
desired_caps['deviceName'] = '127.0.0.1::62001' # If it is a real machine, fill in the equipment name ; Because we use simulators , Fill in IP Port number 
desired_caps['appPackage'] = 'com.android.contacts' # APP The package name ; Here we use the address book 
desired_caps['appActivity'] = '.activities.PeopleActivity' # The name of the launched interface ( Or the startup name , The default is "." At the beginning )
desired_caps['automationName']='UiAutomator1'

Or it can be directly understood as a configuration file pattern , that Capability What is it ? What kind of information does it contain ? This is what we need to learn in today's chapter .

What is? Capability

Capability Configuration explanation


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved