How to set up a Mobile Device Connection
How to set up a Mobile Device Connection
Introduction
In this article, you will learn how to set up connections in Leapwork to connect to different servers for running mobile automation flows. It explains the steps for creating and saving connections, including how to configure the server, hostname, port, and path. The article also covers how to choose the capture mode (Screenshot or Streaming) and test the connection. Additionally, it provides important details on how to connect iOS and Android devices, including how to find the hostname for each device.
Connections
Based on the availability, the user can choose to connect to different servers. Multiple connections can be created and saved which can be used for running the flows.
Pre-requisites:
- Appium Server should be installed on the machine and running; refer to the link for setting up the Appium server.
For Appium 2 server, please note there is a change in the base path. Only / is required instead of /wd/ hub.
Example of connection screen for Appium 2
iOS/Android Device Connection
- Define a unique title for the connection
- The description field allows the user to enter further details about the connection.
- Select the server from the list of dropdown values on which the mobile automation is required to be executed.
- Enter the hostname.
- The hostname will be ‘localhost’ if the same system is being used to configure a mobile device on which Leapwork exists.
- The hostname will be the IP address (details provided below for iOS devices) if multiple systems and devices are being used.
- Enter the Port configured in Appium.
- Enter the Path. Eg. /wd/hub
- Choose from the below available modes in which the mobile automation flow is required to be captured.
- Screenshot - The screenshots of individual blocks will be captured as the flow executes on the mobile device ensuring effective debugging. This is the most viable option for optimal performance while executing multiple flows.
- Streaming - The flow being executed on the mobile device will be streamed in video mode. This option requires more space and high-speed internet to ensure optimal performance. The user may notice a slight lag in capturing (using recorder) or executing multiple flows with streaming mode as it may impair the run performance.
Note: The hostname for iPhone can be obtained from Settings->Wi-Fi. Click on the information icon at the right of the connected network. The value in the field IP Address would be the host name for the device.
Note: The hostname for mac can be obtained from System Preferences → Network. Select the Wi-Fi or the ethernet with which the device is connected to the internet. The IP address on the right pane will be the host name for the device. Screenshot below for reference.
The user can test the connection by clicking on Test connection button.
Appium 2
With changes in Appium 2 done, there is a slight change for defining the Base Path
If you have any questions, please reach out to our Priority Support team.