3

Use Case

I have one mobile device connected on a laptop whose IP is 10.132.222.23. Now I want to make appium session with the device from another laptop.

This is possible when we do it from Appium Desktop, but I want to explore a command line option to do the same.

What I did

from my laptop, I tried to run the command

appium -a 10.132.222.23 -p 4734

However, this fails. I believe that I am missing some essentials parameter to make the session.

Tanveer Munir
  • 1,956
  • 1
  • 12
  • 27
pankaj mishra
  • 2,555
  • 2
  • 17
  • 31

1 Answers1

0

In your remote laptop(one that is connected with mobile device) start the appium server:

appium -a 127.0.0.1 -p 4723 --session-override

Find the ip address of remote laptop.

In your other laptop, initialize AppiumDriver and DesiredCapabilities

AppiumDriver driver;
DesiredCapabilities caps = new DesiredCapabilities();
//add your capabilities

driver= new AndroidDriver<MobileElement>(new URL("http://xxx.xxx.xx.xx:4723/wd/hub"), caps);

where xxx.xxx.xx.xx is the ip address of remote laptop.

Suban Dhyako
  • 2,436
  • 4
  • 16
  • 38