• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python expected.element_displayed函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中marionette_driver.expected.element_displayed函数的典型用法代码示例。如果您正苦于以下问题:Python element_displayed函数的具体用法?Python element_displayed怎么用?Python element_displayed使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了element_displayed函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: select_change_icon_layout

 def select_change_icon_layout(self):
     element = Wait(self.marionette).until(
         expected.element_present(*self._change_icon_layout_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     element.tap()
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(expected.element_displayed(*self._confirm_layout_button_locator))
开发者ID:Archaeopteryx,项目名称:gaia,代码行数:7,代码来源:homescreen_settings.py


示例2: __init__

 def __init__(self, marionette):
     root = marionette.find_element(*self._details_page_locator)
     PageRegion.__init__(self, marionette, root)
     Wait(self.marionette).until(expected.element_displayed(
         self.root_element.find_element(*self._affected_apps_locator)))
     Wait(self.marionette).until(expected.element_displayed(
         self.root_element.find_element(*self._state_toggle_locator)))
开发者ID:Archaeopteryx,项目名称:gaia,代码行数:7,代码来源:addon_details.py


示例3: tap_call_forwarding

 def tap_call_forwarding(self):
     element = self.marionette.find_element(*self._call_forwarding_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(expected.element_displayed(
         *self._call_forwarding_page_locator))
开发者ID:DouglasSherk,项目名称:gaia,代码行数:7,代码来源:call_settings.py


示例4: _switch_to_correct_layout

 def _switch_to_correct_layout(self, val):
     if val.isspace() or val in [',', '.']:
         # certain keys are available on every keyboard panel
         pass
     # Alphabetic keys available on the basic page
     elif val.isalpha():
         is_upper_case = self._is_upper_case
         # If the key to press isalpha and the keyboard layout is not, go back to Basic
         if not self._layout_page == 0:
             self._tap_page_switching_key(0)
             Wait(self.marionette).until(lambda m: self._layout_page == 0)
         # If the key to press isupper and the keyboard is not (or vice versa) then press shift
         if not val.isupper() == is_upper_case:
             self._tap(self._upper_case_key)
             Wait(self.marionette).until(lambda m: is_upper_case != self._is_upper_case)
     # Numbers and symbols are in other keyboard panels
     else:
         # If it's not space or alpha then it must be in Alternate or Symbol.
         # It can't be in Basic so let's go into Alternate and then try to find it
         if self._layout_page == 0 and not self._current_input_type == 'number' and not self._current_input_mode == 'numeric':
             self._tap_page_switching_key(1)
             page_0_key_locator = (self._page_switching_key_locator[0], self._page_switching_key_locator[1] % (0))
             Wait(self.marionette).until(expected.element_displayed(*page_0_key_locator))
         # If it is not present here then it must be in the other non-Basic page
         # (since we must be in either Alternate or Symbol at this stage)
         if not self.is_element_present(*self._key_locator(val)):
             if self._layout_page == 1:
                 self._tap_page_switching_key(2)
                 page_1_key_locator = (self._page_switching_key_locator[0], self._page_switching_key_locator[1] % (1))
                 Wait(self.marionette).until(expected.element_displayed(*page_1_key_locator))
             else:
                 self._tap_page_switching_key(1)
                 page_2_key_locator = (self._page_switching_key_locator[0], self._page_switching_key_locator[1] % (2))
                 Wait(self.marionette).until(expected.element_displayed(*page_2_key_locator))
开发者ID:AaskaShah,项目名称:gaia,代码行数:34,代码来源:app.py


示例5: tap_confirm_delay

 def tap_confirm_delay(self):
     element = Wait(self.marionette).until(
         expected.element_present(*self._confirm_delay_change_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     element.tap()
     self.apps.switch_to_displayed_app()
     Wait(self.marionette).until(expected.element_displayed(*self._delay_locator))
开发者ID:Archaeopteryx,项目名称:gaia,代码行数:7,代码来源:accessibility.py


示例6: tap_auto_retrieve_selector

 def tap_auto_retrieve_selector(self):
     element = self.marionette.find_element(*self._auto_retrieve_selector_locator)
     Wait(self.marionette).until(expected.element_displayed(element))
     element.tap()
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(expected.element_displayed(
         *self._auto_retrieve_ok_button_locator))
开发者ID:Archaeopteryx,项目名称:gaia,代码行数:7,代码来源:message.py


示例7: confirm_apn_selection

 def confirm_apn_selection(self):
     element = self.marionette.find_element(*self._apn_selector_confirm_button_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     self.apps.switch_to_displayed_app()
     Wait(self.marionette).until(expected.element_displayed(*self._apn_editor_page_locator))
开发者ID:anubhav7495,项目名称:gaia,代码行数:7,代码来源:sim_settings.py


示例8: search

    def search(self, term):
        iframe = Wait(self.marionette).until(
            expected.element_present(*self._marketplace_iframe_locator))
        Wait(self.marionette).until(expected.element_displayed(iframe))
        self.marionette.switch_to_frame(iframe)

        # This sleep seems necessary, otherwise on device we get timeout failure on display search_box sometimes, see bug 1136791
        import time
        time.sleep(10)

        search_toggle = Wait(self.marionette).until(
            expected.element_present(*self._search_toggle_locator))
        Wait(self.marionette).until(expected.element_displayed(search_toggle))
        search_toggle.tap()

        search_box = Wait(self.marionette).until(
            expected.element_present(*self._search_locator))
        Wait(self.marionette).until(expected.element_displayed(search_box))

        # This sleep is necessary, otherwise the search results are not shown on desktop b2g
        import time
        time.sleep(0.5)

        # search for the app
        search_box.send_keys(term)
        search_box.send_keys(Keys.RETURN)
        return SearchResults(self.marionette)
开发者ID:anubhav7495,项目名称:gaia,代码行数:27,代码来源:app.py


示例9: enable_roaming

 def enable_roaming(self):
     element = Wait(self.marionette).until(
         expected.element_present(*self._data_roaming_enabled_label_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     Wait(self.marionette).until(expected.element_displayed(element) and expected.element_enabled(element))
     element.tap()
     return self.data_prompt
开发者ID:pottierg,项目名称:gaia,代码行数:7,代码来源:cell_data.py


示例10: tap_auth_numbers

 def tap_auth_numbers(self):
     element = self.marionette.find_element(*self._auth_number_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(expected.element_displayed(
         *self._auth_number_page_locator))
开发者ID:DouglasSherk,项目名称:gaia,代码行数:7,代码来源:call_settings.py


示例11: tap_sim_1

 def tap_sim_1(self):
     element = self.marionette.find_element(*self._sim_1_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(expected.element_displayed(
         *self._call_settings_page_locator))
开发者ID:DouglasSherk,项目名称:gaia,代码行数:7,代码来源:call_settings.py


示例12: tap_fixed_dialing

 def tap_fixed_dialing(self):
     element = self.marionette.find_element(*self._fixed_dialing_numbers_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(expected.element_displayed(
         *self._fixed_dialing_page_locator))
开发者ID:DouglasSherk,项目名称:gaia,代码行数:7,代码来源:call_settings.py


示例13: open_get_more_home_screen

 def open_get_more_home_screen(self):
     element = Wait(self.marionette).until(
         expected.element_present(*self._get_more_homescreen_locator))
     Wait(self.marionette).until(expected.element_displayed(element))
     element.tap()
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(expected.element_displayed(*self._pick_cancel_button_locator))
开发者ID:eliperelman,项目名称:gaia,代码行数:7,代码来源:homescreen_settings.py


示例14: confirm_network_type

 def confirm_network_type(self):
     element = self.marionette.find_element(*self._network_type_confirm_button_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     self.apps.switch_to_displayed_app()
     Wait(self.marionette).until(expected.element_displayed(*self._network_type_selector_locator))
开发者ID:anubhav7495,项目名称:gaia,代码行数:7,代码来源:sim_settings.py


示例15: tap_sim_1

    def tap_sim_1(self):
        element = self.marionette.find_element(*self._sim_1_locator)
        Wait(self.marionette).until(expected.element_displayed(element) and expected.element_enabled(element))
        element.tap()
        Wait(self.marionette).until(expected.element_displayed(*self._call_settings_page_locator))

        menu_item = self.marionette.find_element(*self._caller_id_menu_item_locator)
        Wait(self.marionette, timeout=120).until(lambda m: not menu_item.get_attribute("aria-disabled"))
开发者ID:nullaus,项目名称:gaia,代码行数:8,代码来源:call_settings.py


示例16: tap_change_passcode

 def tap_change_passcode(self):
     element = self.marionette.find_element(*self._change_passcode_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(expected.element_displayed(*self._passcode_page_locator))
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(lambda m: self.keyboard.is_keyboard_displayed)
     self.apps.switch_to_displayed_app()
开发者ID:jorrete,项目名称:gaia,代码行数:8,代码来源:call_settings.py


示例17: tap_call_barring_all

 def tap_call_barring_all(self):
     element = self.marionette.find_element(*self._call_barring_all_switch_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(expected.element_displayed(*self._call_barring_all_cancel_button_locator))
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(lambda m: self.keyboard.is_keyboard_displayed)
     self.apps.switch_to_displayed_app()
开发者ID:jorrete,项目名称:gaia,代码行数:8,代码来源:call_settings.py


示例18: tap_forward_unanswered

 def tap_forward_unanswered(self):
     element = self.marionette.find_element(*self._call_forwarding_unanswered_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(expected.element_displayed(*self._call_forwarding_unanswered_page_locator))
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(lambda m: self.keyboard.is_keyboard_displayed)
     self.apps.switch_to_displayed_app()
开发者ID:jorrete,项目名称:gaia,代码行数:8,代码来源:call_settings.py


示例19: tap_voicemail

 def tap_voicemail(self):
     element = self.marionette.find_element(*self._voicemail_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and expected.element_enabled(element))
     element.tap()
     Wait(self.marionette).until(expected.element_displayed(*self._voicemail_number_locator))
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(lambda m: self.keyboard.is_keyboard_displayed)
     self.apps.switch_to_displayed_app()
开发者ID:jorrete,项目名称:gaia,代码行数:8,代码来源:call_settings.py


示例20: select_roaming_protocol

 def select_roaming_protocol(self):
     element = self.marionette.find_element(*self._roaming_protocol_locator)
     Wait(self.marionette).until(expected.element_displayed(element) and
                                 expected.element_enabled(element))
     element.tap()
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(expected.element_displayed(
         *self._apn_selector_confirm_button_locator))
开发者ID:anubhav7495,项目名称:gaia,代码行数:8,代码来源:sim_settings.py



注:本文中的marionette_driver.expected.element_displayed函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python expected.element_enabled函数代码示例发布时间:2022-05-27
下一篇:
Python marionette_driver.Wait类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap