I am running my app in genymotion emulator, am trying to access the app from android view client python library, but can't seem to find a way to access it. View client only takes port for access, so i can't work with IP address of the remote virtual machine. It would be helpful if you guys can help out and tell me how do i access genymotion emulator via ip address and port.
Asked
Active
Viewed 185 times
0

Martijn Pieters
- 1,048,767
- 296
- 4,058
- 3,343

Ankit Arora
- 509
- 2
- 18
-
**AndroidViewClient** connects to the device or emulator via `adb` then you must have it listed in `adb devices`, otherwise you have to establish the `adb` connection first. – Diego Torres Milano Jun 23 '16 at 19:55
-
The `adb` connection can be via TCP: `List of devices attached 192.168.2.200:5555 device` – Diego Torres Milano Jun 23 '16 at 20:03
1 Answers
1
For anyone who comes here after me. I found the signature for connectToDeviceOrExit() in viewclient.py from GitHub to be this:
connectToDeviceOrExit(timeout=60, verbose=False, ignoresecuredevice=False, ignoreversioncheck=False, serialno=None)
You can therefore do the following to use Android View Client with Genymotion:
from com.dtmilano.android.viewclient import ViewClient
vc = ViewClient(*ViewClient.connectToDeviceOrExit(serialno="192.168.2.200:5555"))