This article demonstrates how to run automated tests on a device that you have already "Opened" (working with it from a web desktop browser).
If you already have some experience, and understand how to open a device for automation mode - you can skip the first items and continue from here content by clicking here
Once you press the Open button, a new page will get opened in a browser tab.
This page has two sections, the left side of the page has the device and operations which can be performed on it.
The section on the right side displays useful utility operations like viewing logs, automation, etc.
Now on the right side of the screen, click the Automation tab followed by the "LET'S START AUTOMATING" button.
Once you have completed the step before, you will get a screen that looks like the screen below.
Make sure you copy the Device ID from this page as shown in the screenshot below.
This concludes all the steps to Reserve and makes the device ready to run Automation.
Running the Automation Tests
Now that you have the devices opened for "Automation Mode" and that the UDID is copied to your clipboard, your next step will be to add the desired capability requesting to run your test on this specific device.
Once your tests execute - you can follow the console log on the device screen, which will print out all the commands executed by the Appium Grid Node
During the execution of the test from the code environment, you can place breakpoints in order to pause the execution and better investigate the application state, fetch dump, and interact with the device.
Please be aware of a potential situation that could prevent debugging an Appium session:
If the test is paused for more time than defined in
newCommandTimeout capability - Appium server session will reset.
The default value of newCommandTimeout is 60 seconds.
While debugging a test it would be better to provide a greater value for this capability. Please note that in case that driver.quit is not being called - you will only be able to execute the next test when the timeout is reached.
More information about using a web interface is available in SeeTest Automation - Web Interface.
After the test is completed, the device web session stays open and subsequent tests can use it. You can find more info on running a test on a reserved device here
In the case of Appium Server projects the subsequent tests running on this device while the web session is open will be using the Appium Server version of the web session, even if capabilities or projects specify a different one. You can find the currently used Appium Server version please see the Appium Project section on Switch to SeeTest Automation