示例#1
0
文件: web.py 项目: github653224/QT4i
 def __init__(self, root, locator, title=None, url=None, **ext):
     Element.__init__(self, root, locator, **ext)
     self._scrollview = root
     self._device = self._app.device
     self._driver = self._device.driver
     self.bundle_id = self._app._bundle_id
     self.udid = self._device.udid
     self.is_simulator = self._device.simulator
     self.title = title
     self.url_key = url
     self._top_offset = 0
     self.page_id = self._init_page_id()
     self._context_ids = {}
     print("webview init page id:%s" % self.page_id)
示例#2
0
文件: web.py 项目: github653224/QT4i
 def __init__(self, app):
     self._app = app
     Window.__init__(self, self._app)
     self.scroll_win = Element(self._app, 'WebView')
     locators = {
         'webview': {
             'type': IOSWebView,
             'root': self.scroll_win,
             'locator': QPath("/classname='WebView'")
         },
     }
     self.updateLocator(locators)
示例#3
0
 def test_click2(self):
     app = App(self.device, 'com.tencent.demo')
     app.start()
     element = Element(app, 2)
     self.device.click2(element)