Appium study notes || VI, according to Xpath find elements

 First, with UIautomatorviewer

   1. The first check elements with UIautomatorviewer

  2. Then write expressions using xpath.

 

  Disadvantages: Verify trouble, we need to verify the code.

 

Second, the function that comes with Appium

  1. Start Inspector Session

  

  2. Fill Capabilities, Save As ... to save

  

  3. After written, in Saved Capability Sets where you can see just written

  

  4. Start Session. At this end of the phone will have a new session connection.

  

  5. Click on Select Elements, and then select the elements to be positioned on the left side of the screen. Then you can see the corresponding column in the middle of the content node, the content can be seen on the right.

  6. Copy the id content selection, click on the search for elements, just enter the id.

   

  7. You can see there are four results.

  

  8. Find a further element xpath expression represents the results can be obtained

  

 

Guess you like

Origin www.cnblogs.com/Lixinhang/p/10968863.html