How to use 'Page command'?


How can I use page command to capture a alert?
I have no idea to to know how to use it.
I want to capture an alert and use with java.

Appium v1.6.4-beta
Xcode 8.2
macOs Sierra 10.12

Thank you.

In Java the command is driver.getPageSource:

Get the page source and then look for an element called, ‘XCUIElementTypeAlert’. If it’s present, then you have an alert.

1 Like