HeadSpin's Browser Automation allows you to run Selenium scripts on browsers on real computer machines connected to Pboxes. If your org has access to Performance Sessions, the data from these browser sessions can also be recorded and examined in the Performance Sessions tab.
Currently all browsers run on macOS machines; support for Windows and Linux machines are coming soon.
To start automation on a browser, you first need to get the browser's Automation Configuration. Available browsers can be found in the Remote Control > Devices tab. Each browser appears on its own row, similar to device rows. If you don't see any browser available, please contact the HeadSpin support team for access.
Each browser row includes basic information about the browser version (listed under the "OS" column). To see a browser's Aumation Configuration settings, click on its row More Actions symbol and select Automation Configuration.
The Automation Configuration dialog will pop up. From this dialog, you can copy the Web Driver URL and capabilities for this browser. This configuration can be used with the HeadSpin Appium IDE or Selenium Scripts.
Browser Automation with HeadSpin Appium IDE
To use browser automation with the HeadSpin Appium IDE, you will need to download the IDE (version 1.16.0 or above) through the Settings and Downloads page, accessed by clicking on your username in the upper-right corner and then clicking the blue 'Settings' button.
Once the IDE has been installed, open it to see the UI below. Copy the Web Driver URL and the capabilities into the IDE. By default, the session will not be recorded. To record the session and capture network data, add <code class="dcode">"headspin:capture": true</code> as a capability.
HeadSpin Appium IDE 1.16.0 and above support additional action types: <code class="dcode">web</code> and <code class="dcode">context</code>. These are typical actions performed in a browser, such as navigating to a URL. To see the available actions, once the session has been started, click on Actions and then choose Web from the dropdown.
The supported actions will appear.
Browser Automation with Selenium Scripts
For a wider set of actions and more test automation, the browser configuration can be used to configure Selenium scripts. Below is an example of a simple Selenium script in Python.
Time Between Commands
The default time the server will wait for a new command is 60 seconds. Once a session has been established, and after every command is sent, if there is no new command within 60 seconds, the session will end. This value can be adjusted with the capability <code class="dcode">headspin:newCommandTimeout</code>. For example:
Watching Live Browser Automation Sessions
When there's a live session on a browser, the Start button to the left of the browser icon will turn into the magnifying glass, as shown in the screenshot below.
Anyone in your team can click on the magnifying glass to view the browser UI and the automation logs in real time.
Viewing Browser Automation Performance Sessions
Sessions recorded with <code class="dcode">"headspin:capture"</code>: true will show up in the Performance Sessions tab, in the session list.
Both the Waterfall UI and the Issue UI are available for these sessions. Click on a UI to view the captured data.