@@ -19,8 +19,8 @@ def get_ios_devices():
1919 return devices
2020
2121
22- def get_ios_version (udid ):
23- command = "ideviceinfo -u %s -k ProductVersion" % udid
22+ def get_ios_version (duid ):
23+ command = "ideviceinfo -u %s -k ProductVersion" % duid
2424 result = subprocess .Popen (command , shell = True , stdout = subprocess .PIPE ,
2525 stderr = subprocess .PIPE ).stdout .readlines ()
2626 for item in result :
@@ -29,26 +29,26 @@ def get_ios_version(udid):
2929 return t [0 ]
3030
3131
32- def get_ios_product_name (udid ):
33- command = "ideviceinfo -u %s -k DeviceName" % udid
32+ def get_ios_product_name (duid ):
33+ command = "ideviceinfo -u %s -k DeviceName" % duid
3434 result = subprocess .Popen (command , shell = True , stdout = subprocess .PIPE ,
3535 stderr = subprocess .PIPE ).stdout .readlines ()
3636 for item in result :
3737 t = item .decode ().split ("\n " )
3838 if len (t ) >= 2 :
3939 return t [0 ]
4040
41- def get_ios_product_type (udid ):
42- command = "ideviceinfo -u %s -k ProductType" % udid
41+ def get_ios_product_type (duid ):
42+ command = "ideviceinfo -u %s -k ProductType" % duid
4343 result = subprocess .Popen (command , shell = True , stdout = subprocess .PIPE ,
4444 stderr = subprocess .PIPE ).stdout .readlines ()
4545 for item in result :
4646 t = item .decode ().split ("\n " )
4747 if len (t ) >= 2 :
4848 return t [0 ]
4949
50- def get_ios_product_os (udid ):
51- command = "ideviceinfo -u %s -k ProductName" % udid
50+ def get_ios_product_os (duid ):
51+ command = "ideviceinfo -u %s -k ProductName" % duid
5252 result = subprocess .Popen (command , shell = True , stdout = subprocess .PIPE ,
5353 stderr = subprocess .PIPE ).stdout .readlines ()
5454 for item in result :
@@ -57,23 +57,23 @@ def get_ios_product_os(udid):
5757 return t [0 ]
5858
5959
60- def get_ios_PhoneInfo (udid ):
61- name = get_ios_product_name (udid )
62- release = get_ios_version (udid )
63- # type = get_ios_product_type(udid )
64- result = {"release" : release , "device" : name , "udid " : udid }
60+ def get_ios_PhoneInfo (duid ):
61+ name = get_ios_product_name (duid )
62+ release = get_ios_version (duid )
63+ # type = get_ios_product_type(duid )
64+ result = {"release" : release , "device" : name , "duid " : duid }
6565 # print(result)
6666 return result
6767
6868#编译facebook的wda到真机
69- def build_wda_ios (udid ):
69+ def build_wda_ios (duid ):
7070 os .popen (
71- "xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=" + udid + " test" )
71+ "xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=" + duid + " test" )
7272
7373
7474if __name__ == '__main__' :
7575 devices = get_ios_devices ()
7676 print (devices )
77- udid = get_ios_devices ()[0 ]
78- get_ios_PhoneInfo (udid )
77+ duid = get_ios_devices ()[0 ]
78+ get_ios_PhoneInfo (duid )
7979
0 commit comments