当前位置:网站首页>Introduction to robotframework (II) app startup of appui automation

Introduction to robotframework (II) app startup of appui automation

2022-07-06 02:37:00 Makasa

Preface

This chapter focuses on appUI A small example of Automation

  • ps: Although this is a small example , But if you want to pass robot To do appUI automation , It's all the same , You can search for keyword combinations to use

    In fact, under normal circumstances , We will use code directly to realize automation , Not in ride Shangxingha , I'll talk about it later robotframework Construction of framework


One 、 Create test cases

 Insert picture description here



Two 、app Start step

1、 download robotframework-AppiumLibrary

pip install robotframework-AppiumLibrary

 Insert picture description here


2、 Guide the package in the test suite

  • Be careful : The package name should be strictly case sensitive , After downloading the package , Remember to guide again
  • Red : It means that the package import failed , black : Then the package is successfully imported
    If red is displayed , If you don't know why , Can open Tools–View RIDE Log Look at the specific errors reported in the log

 Insert picture description here

 Insert picture description here


3、UI Use case writing

 Parameters 1、Appium Where url route ( This is fixed ):http://localhost:4723/wd/hub

 Parameters 2、platformName: Name of the tested platform  Android/ios

 Parameters 3、platformVersion : edition 

 Parameters 4、deviceName: Equipment name 

 Parameters 5、appPackage: test app The package name 

 Parameters 6、appActivity: test app Of activity name 

 Insert picture description here

 Insert picture description here

If you don't know how to use specific keywords ? You can press the shortcut key F5, You can search

 Insert picture description here


4、 Run the use case to see the results

 Insert picture description here

 Insert picture description here

原网站

版权声明
本文为[Makasa]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060234569224.html