airtest#device switch printing app device

#20200811 #Device
switch printing app device
from airtest.core.api import connect_device
dev = connect_device('Android:///192.168.88.116:5555?cap_method=javacap&touch_method=adb')#Use uri to initialize the device and set it to Current device
dev = connect_device('Android:///192.168.88.102:6555?cap_method=javacap&touch_method=adb') #Connect the
first device
set_current("192.168.88.116:5555")#Set the current active device
dev = device( ) #Return to the current active device
print("The app installed on the first device")
print(dev.list_app(third_only=True)) #Connect the
second device
set_current("192.168.88.102:6555")
dev = device()
print("The app installed on the first device")
print(dev.list_app(third_only=True))

Guess you like

Origin blog.csdn.net/weixin_42540340/article/details/107934332