Applet UI Automation (a): appium applet attempts to automate

appium small-automate try:

As a result of the work of app automation using a appium, so the first try applet Automation appium, the US Mission to the small program as an example (python script to achieve)

First, the basic configuration information

Start micro-channel app python script as follows:

Second, write test scripts into the applet Home

Home enter the US group applet to achieve the following script:

Third, the take-home positioning US group elements (try unsatisfactory results)

(1) try to bring their own UI Automator positioning tool for positioning android adk 

 

On the UI Automator, click on page elements can be found, the applet page all text elements class attribute is android.view.View, the picture of class attributes are android.widget.Image, and no common attribute values ​​id, etc., can only by text, elements unique positioning coordinates.

(2) get the page context, see if you can switch to the applet page (not switch)

Try to print US group Home context , the following script:
 
Print Results:
 

 

 You can see from the results, context is only one, can not switch to an applet page

to sum up
Applet view to locate the page elements, as shown below:
 
As can be seen from the figure above, the applet class All attributes are android.view.View text elements, images, class attributes are android.widget.Image, and no common attribute value id and the like, can be only text, the coordinates to locate unique elements. At this point you can navigate to the elements, but can not distinguish between elements assertion check.

Four, appium small-automate summary

Applet page element is available UI Automator, appium inspector and other location tools to locate an element, but the element class attributes are the same, although it can be positioned to the elements, but can not distinguish between the elements most assertion checking, we can not achieve the majority of automation Example. So appium achieve applet is not feasible automation, process automation is not recommended with small appium.

After appium in small process automation failed, they continue to look for other app automation tools, hard to find after the discovery of NetEase airtest applicable to small process automation, process automation if need be small, you can see small series of blog [ applet UI Automation (B): airtest small process automation ]


 
 
  
 
 

Guess you like

Origin www.cnblogs.com/mini-monkey/p/11212736.html