androidandroid-emulatorandroidviewclient

How to run Genymotion with android view client?


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.


Solution

  • 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"))