开发者

UIAutomation second view ios

开发者 https://www.devze.com 2023-04-12 13:07 出处:网络
Hi, I\'m trying to use UIAutomation for my application. I am able to test the first page of my application. Now mine is a navigation based application, I tested the edit buttons for the tableview. Whe

Hi, I'm trying to use UIAutomation for my application. I am able to test the first page of my application. Now mine is a navigation based application, I tested the edit buttons for the tableview. Whe开发者_如何学编程n I click the tablecell the application navigates to different view. How to test this view?? Here are the few questions I have:

  1. How to automate testing for multiple views??
  2. How can i get access to the elements in the second view??
  3. How to make a screenshot of the page showing error??? Is this possible?
  4. Can I check for touch gestures also??

Thanks in advance.


  1. The new view just gets added to the stack, so it's now available from your mainWindow().elements (or other methods like tableViews(), etc). Do some target.logElementTree() calls before and after the new view is pushed and you should see the changes.
  2. Access it through the various methods from the mainWindow(), then access it's children through similar methods on the parent view.
  3. To take a screenshot use UIATarget.localTarget().captureScreenWithName("");
  4. You can do pinches, drags and flicks - see the Instruments Users Guide - specifically the Built-in Instruments / UI Automation chapter for more info.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号