文档详情

Appium Python API 中文版.pdf

发布:2017-05-21约2.28万字共21页下载文档
文本预览下载声明
Appium_Python_Api 文档 1.contexts contexts(self): Returns the contexts within the current session. 返回当前会话中的上下文,使用后可以识别H5 页面的控件 :Usage : driver.contexts 用法 driver.contexts 2. current_context current_context(self): Returns the current context of the current session. 返回当前会话的当前上下文 :Usage : driver.current_context 用法driver. current_context 3. context context(self): Returns the current context of the current session. 返回当前会话的当前上下文。 :Usage : driver.context 用法driver. Context 4. find_element_by_ios_uiautomation find_element_by_ios_uiautomation(self, uia_string): Finds an element by uiautomation in iOS. 通过iOS uiautomation 查找元素 :Args : - uia_string - The element name in the iOS UIAutomation library :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): Finds an element by accessibility id. 通过accessibility id 查找元素 :Args : - id - a string corresponding to a recursive element search using the Id/Name that the native Accessibility options utilize :Usage : driver.find_element_by_accessibility_id() 用法driver.find_element_by_accessibility_id ( ‘id’) 6.scroll scroll(self, origin_el, destination_el): Scrolls from one element to another 从元素origin_el 滚动至元素destination_el :Args : - originalEl - the element from which to being scrolling - destinationEl - the element to scroll to :Usage : driver.scroll(el1, el2) 用法 driver.scroll(el1,el2) 7. drag_and_drop drag_and_drop(self, origin_el, destination_el): Drag the origin element to the destination element 将元素origin_el 拖到目标元素destination_el :Args : - originEl - the element to drag - destinationEl - the element to drag to 用法 driver
显示全部
相似文档