4 ms·
I've been using UIAutomation to automate screenshot generation and make it easier to keep support documents up-to-date. Do you know if this works for that? Stra
by rbritton 13y ago
I've been using UIAutomation to automate screenshot generation and make it easier to keep support documents up-to-date. Do you know if this works for that? Straight UIAutomation times out a lot doing that and often requires multiple runs to get everything.
- MaxGabriel 13y agoYes. You can send Javascript to be evaluated by UIAutomation so it has all the capabilities of that UIAutomation does. There's a PR that adds this natively https://github.com/inkling/Subliminal/pull/118 https://github.com/inkling/Subliminal/pull/118, but you can also just implement it yourself quite easily: - (void)captureScreenshotWithFilename:(NSString *)filename { [[SLTerminal sharedTerminal] evalWithFormat:@"UIATarget.localTarget().captureScreenWithName(\"%@\")", [filename slStringByEscapingForJavaScriptLiteral]]; }