Prabhu Konchada
Prabhu Konchada

Reputation: 548

How to capture screenshots using UI automation on a iPhone?

I connected my iPhone 5s running iOS 8.3 to my mac which runs my script using "Automation Instrument" and I want to capture screenshots of UI during this process on my iPhone 5s and save them to my mac's disk at a particular location.

1.printing "target.logElementTree();" displays my elements but what I want is "Screenshot of device in realtime during run of automated script" so can we save the screenshot using this approach ????

2.I don't have the code of the app except the .ipa

Thanks for your time and efforts in going through or answering this question

Upvotes: 1

Views: 143

Answers (1)

Prabhu Konchada
Prabhu Konchada

Reputation: 548

With this command I am able to view the screenshot in trace log during automation.

UIATarget.localTarget().captureScreenWithName("Prabhu Konchada");

All we need to do is export these results to find them in the your desired folder !!!!

Upvotes: 1

Related Questions