I have these notifications (on CI machine):
That "pollute" my screenshots of the app that I'm testing using XCUITests
. How can I dismiss or hide them during the test?
I've seen some answers for iOS (like dragging on XCUIApplication(bundleIdentifier: "com.apple.springboard")
), but the same things do not seem to work for Mac as springboard doesn't exists on Mac.
XCUIElement.screenshot
just takes a screenshot of everything on screen and then clips it to the target element. – HurtadoXCUIElement
implementsXCUIScreenshotProviding
, which hasscreenshot
method: developer.apple.com/documentation/xctest/…. You can also call it onXCUIScreen
too. – Hurtado