Esempio n. 1
0
 def __init__(self, driver):
     super(StatusBar, self).__init__(driver)
     self.updateLocator({
         '通知图标列表': {
             'type': ListView,
             'root': self,
             'locator': QPath('/Id="notificationIcons"')
         },  # com.android.systemui.statusbar.phone.IconMerger
         'Wifi': {
             'type': ImageView,
             'root': self,
             'locator': QPath('/Id="wifi_signal"')
         },
         '手机信号': {
             'type': ImageView,
             'root': self,
             'locator': QPath('/Id="mobile_signal"')
         },
         '电池': {
             'type': ImageView,
             'root': self,
             'locator': QPath('/Id="battery"')
         },
         '时间': {
             'type': TextView,
             'root': self,
             'locator': QPath('/Id="clock"')
         }
     })
Esempio n. 2
0
 def __init__(self, app):
     super(CrashWindow, self).__init__(app)
     self.updateLocator({
         '提示': {
             'type': TextView,
             'root': self,
             'locator': QPath('/Id="message"')
         },
         '确定': {
             'type': Button,
             'root': self,
             'locator': QPath('/Id="button1"')
         },
     })
Esempio n. 3
0
 def __init__(self, app):
     super(AppChoosePanel_4_1, self).__init__(app)
     self.updateLocator({
         'GridView': {
             'type': GridView,
             'root': self,
             'locator': QPath('/Id="resolver_grid"')
         },
         '应用名': {
             'type': TextView,
             'root': '@GridView',
             'locator': QPath('/Id="text1"')
         },
     })
Esempio n. 4
0
 def __init__(self, app):
     super(AppChoosePanel_2_2, self).__init__(app)
     self.updateLocator({
         'GridView': {
             'type': GridView,
             'root': self,
             'locator': QPath('/Id="select_dialog_listview"')
         },  # com.android.internal.app.AlertController$RecycleListView
         '应用名': {
             'type': TextView,
             'root': '@GridView',
             'locator': QPath('/Id="text1"')
         },
     })
Esempio n. 5
0
 def __init__(self, browser):
     super(QT4ABrowserWindow, self).__init__(browser)
     self.updateLocator({
         '标题': {
             'type': TextView,
             'root': self,
             'locator': QPath('/Id="text_title"')
         },
         'WebView': {
             'type': WebView,
             'root': self,
             'locator': QPath('/Id="webView1"')
         },
     })
Esempio n. 6
0
 def __init__(self, app):
     super(PastePopup, self).__init__(app, False)
     self.updateLocator({
         '粘贴': {
             'type':
             TextView,
             'root':
             self,
             'locator':
             QPath('/Text="%s"' % self._app.get_string_resource('paste'))
         },  # 粘贴
         '替换': {
             'type': TextView,
             'root': self,
             'locator': QPath('/Text="替换..."')
         },
     })
Esempio n. 7
0
 def __init__(self, driver):
     super(Toast, self).__init__(driver, False)
     self.updateLocator({
         '消息': {
             'type': TextView,
             'root': self,
             'locator': QPath('/Id="message"')
         },
     })
Esempio n. 8
0
 def __init__(self, driver):
     super(StatusBarWindow, self).__init__(driver)
     self.updateLocator({
         '状态栏': {
             'type': View,
             'root': self,
             'locator': QPath('/Id="status_bar"')
         },
         '通知栏 ': {
             'type': View,
             'root': self,
             'locator': QPath('/Id="notification_panel"')
         },
         '通知栏图标': {
             'type': View,
             'root': '@状态栏',
             'locator': QPath('/Id="notificationIcons"')
         },
     })
Esempio n. 9
0
 def __init__(self, app):
     super(BrowserWindow, self).__init__(app)
     self.updateLocator({
         '标题栏': {
             'type': TitleBar,
             'root': self,
             'locator': QPath('/Id="main_content" /Instance="2"')
         },
         '地址栏': {
             'type': UrlInputView,
             'root': '@标题栏',
             'locator': QPath('/Id="url"')
         },
         'WebView': {
             'type': BrowserWebView,
             'root': self,
             'locator': QPath('/Id="webview_wrapper" /Instance="1"')
         },
     })
Esempio n. 10
0
 def __init__(self, app):
     super(AppResolverPanel, self).__init__(app)
     self.updateLocator({
         '应用列表': {
             'type': GridView,
             'root': self,
             'locator': QPath('/Id="resolver_grid"')
         },
         '应用名': {
             'type': TextView,
             'root': '@应用列表',
             'locator': QPath('/Id="text1"')
         },
         '始终': {
             'type': Button,
             'root': self,
             'locator': QPath('/Id="button_always"')
         },
         '仅此一次': {
             'type': Button,
             'root': self,
             'locator': QPath('/Id="button_once"')
         },
     })
Esempio n. 11
0
 def __init__(self, driver):
     super(StatusBarExpanded, self).__init__(driver)
     self.updateLocator({
         '日期': {
             'type': TextView,
             'root': self,
             'locator': QPath('/Id="content" /Id="data" && MaxDepth="4"')
         },
         '设置': {
             'type': ImageView,
             'root': self,
             'locator': QPath('/Id="settings_button"')
         },
         '清除': {
             'type': ImageView,
             'root': self,
             'locator': QPath('/Id="clear_all_button"')
         },
         'Main': {
             'type': ScrollView,
             'root': self,
             'locator': QPath('/Id="content" /Id="scroll" && MaxDepth="3"')
         },
         '通知列表': {
             'type': ListView,
             'root': '@Main',
             'locator': QPath('/Id="latestItems"')
         },
         '图标': {
             'type':
             ImageView,
             'root':
             '@通知列表',
             'locator':
             QPath('/Id="status_bar_latest_event_content" /Id="icon"')
         },
         '标题': {
             'type':
             TextView,
             'root':
             '@通知列表',
             'locator':
             QPath(
                 '/Id="status_bar_latest_event_content_large_icon" /Id="line1" /Id="title"'
             )
         },
         '时间': {
             'type':
             TextView,
             'root':
             '@通知列表',
             'locator':
             QPath(
                 '/Id="status_bar_latest_event_content_large_icon" /Id="line1" /Id="time"'
             )
         },  # DateTimeView
         '内容': {
             'type':
             TextView,
             'root':
             '@通知列表',
             'locator':
             QPath(
                 '/Id="status_bar_latest_event_content_large_icon" /Id="line3" /Id="text"'
             )
         },
     })