预览加载中,请您耐心等待几秒...
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

亲,该文档总共21页,到这已经超出免费预览范围,如果喜欢就直接下载吧~

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

Appium_Python_Api文档 1.contexts contexts(self): Returnsthecontextswithinthecurrentsession. 返回当前会话中的上下文,使用后可以识别H5页面的控件 :Usage: driver.contexts 用法driver.contexts 2.current_context current_context(self): Returnsthecurrentcontextofthecurrentsession. 返回当前会话的当前上下文 :Usage: driver.current_context 用法driver.current_context 3.context context(self): Returnsthecurrentcontextofthecurrentsession. 返回当前会话的当前上下文。 :Usage: driver.context 用法driver.Context 4.find_element_by_ios_uiautomation find_element_by_ios_uiautomation(self,uia_string): FindsanelementbyuiautomationiniOS. 通过iOSuiautomation查找元素 :Args: -uia_string-TheelementnameintheiOSUIAutomationlibrary :Usage: driver.find_element_by_ios_uiautomation('.elements()[1].cells()[2]') 用法dr.find_element_by_ios_uiautomation(‘elements’) 5.find_element_by_accessibility_id find_element_by_accessibility_id(self,id): Findsanelementbyaccessibilityid. 通过accessibilityid查找元素 :Args: -id-astringcorrespondingtoarecursiveelementsearch usingthe Id/NamethatthenativeAccessibilityoptionsutilize :Usage: driver.find_element_by_accessibility_id() 用法driver.find_element_by_accessibility_id(‘id’) 6.scroll scroll(self,origin_el,destination_el): Scrollsfromoneelementtoanother 从元素origin_el滚动至元素destination_el :Args: -originalEl-theelementfromwhichtobeingscrolling -destinationEl-theelementtoscrollto :Usage: driver.scroll(el1,el2) 用法driver.scroll(el1,el2) 7.drag_and_drop drag_and_drop(self,origin_el,destination_el): Dragtheoriginelementtothedestinationelement 将元素origin_el拖到目标元素destination_el :Args: -originEl-theelementtodrag -destinationEl-theelementtodragto 用法driver.drag_and_drop(el1,el2) 8.tap tap(self,positions,duration=None): Tapsonanparticularplacewithuptofivefingers,holdingfora certaintime 模拟手指点击(最多五个手指),可设置按住时间长度(毫秒) :Args: -positions-anarrayoftuplesrepresentingthex/y coordinatesof thefingerstotap.Lengthcanbeuptofive. -duration-(optional)lengthoftimetotap,inms :Usage: driver.tap([(100,20),(100,60),(100,100)],500) 用法driver.tap([(x,y),(x1,y