当前位置: 首页>>代码示例>>Python>>正文


Python expected.element_not_displayed函数代码示例

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


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

示例1: select

    def select(self, match_string):
        # This needs to be duplicated from base.py because when we return from the frame
        # we don't return to the Settings app in its initial state,
        # so the wait for in its launch method times out

        # have to go back to top level to get the B2G select box wrapper
        self.marionette.switch_to_frame()

        Wait(self.marionette).until(
            expected.elements_present(
                By.CSS_SELECTOR, '.value-selector-container li'))

        options = self.marionette.find_elements(By.CSS_SELECTOR, '.value-selector-container li')
        close = self.marionette.find_element(By.CSS_SELECTOR, 'button.value-option-confirm')

        # loop options until we find the match
        for li in options:
            if match_string == li.text:
                li.tap()
                break
        else:
            raise Exception("Element '%s' could not be found in select wrapper" % match_string)

        close.tap()
        Wait(self.marionette).until(expected.element_not_displayed(close))

        # TODO we should find something suitable to wait for, but this goes too
        # fast against desktop builds causing intermittent failures
        time.sleep(0.2)

        # now back to app
        self.apps.switch_to_displayed_app()
开发者ID:William-Hsu,项目名称:gaia,代码行数:32,代码来源:battery.py

示例2: reject_call

 def reject_call(self):
     Wait(self.marionette).until(
         expected.element_displayed(*self._lockscreen_handle_locator))
     self._handle_incoming_call('reject')
     self.marionette.switch_to_frame()
     Wait(self.marionette).until(
         expected.element_not_displayed(*self._call_screen_locator))
开发者ID:AutomatedTester,项目名称:gaia,代码行数:7,代码来源:call_screen.py

示例3: tap_save_event

 def tap_save_event(self):
     event_start_time = self.marionette.find_element(*self._event_start_time_value_locator).text
     event_start_date = self.marionette.find_element(*self._event_start_date_value_locator).text
     el = self.marionette.find_element(*self._modify_event_view_locator)
     self.marionette.find_element(*self._save_event_button_locator).tap()
     Wait(self.marionette).until(expected.element_not_displayed(el))
     return datetime.strptime(event_start_time + event_start_date, '%I:%M %p%m/%d/%Y')
开发者ID:6a68,项目名称:gaia,代码行数:7,代码来源:event.py

示例4: a11y_click_next_to_wifi_section

 def a11y_click_next_to_wifi_section(self):
     progress = self.marionette.find_element(*self._progress_activity_locator)
     self.a11y_click_next()
     Wait(self.marionette).until(expected.element_not_displayed(progress))
     Wait(self.marionette).until(expected.element_displayed(
         Wait(self.marionette).until(expected.element_present(
             *self._section_wifi_locator))))
开发者ID:seanhussey,项目名称:gaia,代码行数:7,代码来源:app.py

示例5: tap_done

 def tap_done(self):
     time_picker = self.marionette.find_element(*self._time_picker_locator)
     self.marionette.find_element(*self._done_button_locator).tap()
     Wait(self.marionette).until(expected.element_not_displayed(time_picker))
     # TODO: wait for the time picker to fade out Bug 1038186
     time.sleep(2)
     self.apps.switch_to_displayed_app()
开发者ID:guhelski,项目名称:gaia,代码行数:7,代码来源:time_picker.py

示例6: wait_for_content_ready

 def wait_for_content_ready(self):
     app = Gallery(self.device.marionette)
     Wait(self.device.marionette, timeout=240).until(
         lambda m: len(m.find_elements(
             By.CSS_SELECTOR, '.thumbnail')) == self.picture_count)
     Wait(self.device.marionette, timeout=60).until(
         expected.element_not_displayed(self.device.marionette.find_element(
             *app._progress_bar_locator)))
开发者ID:davehunt,项目名称:eideticker,代码行数:8,代码来源:gallery.py

示例7: reset_mobile_usage

 def reset_mobile_usage(self):
     self.marionette.find_element(*self._reset_button_locator).tap()
     reset_mobile_usage = Wait(self.marionette).until(
         expected.element_present(*self._reset_mobile_usage_button_locator))
     Wait(self.marionette).until(expected.element_displayed(reset_mobile_usage))
     reset_dialog = self.marionette.find_element(*self._reset_dialog_locator)
     reset_mobile_usage.tap()
     Wait(self.marionette).until(expected.element_not_displayed(reset_dialog))
开发者ID:6a68,项目名称:gaia,代码行数:8,代码来源:settings.py

示例8: tap_back

 def tap_back(self):
     el = self.marionette.find_element(*self._details_header_locator)
     Wait(self.marionette).until(expected.element_displayed(el))
     # TODO: remove tap with coordinates after Bug 1061698 is fixed
     el.tap(25, 25)
     Wait(self.marionette).until(expected.element_not_displayed(el))
     from gaiatest.apps.contacts.app import Contacts
     return Contacts(self.marionette)
开发者ID:6a68,项目名称:gaia,代码行数:8,代码来源:contact_details.py

示例9: tap_edit

 def tap_edit(self):
     edit = Wait(self.marionette).until(expected.element_present(
         *self._edit_contact_button_locator))
     Wait(self.marionette).until(expected.element_displayed(edit))
     edit.tap()
     Wait(self.marionette).until(expected.element_not_displayed(edit))
     from gaiatest.apps.contacts.regions.contact_form import EditContact
     return EditContact(self.marionette)
开发者ID:6a68,项目名称:gaia,代码行数:8,代码来源:contact_details.py

示例10: before_scroll

 def before_scroll(self):
     B2GPerfScrollTest.before_scroll(self)
     # TODO Replace with a suitable wait
     self.logger.debug('Sleep for 5 seconds to allow scan to start')
     time.sleep(5)
     self.logger.debug('Waiting for progress bar to be hidden')
     Wait(self.marionette, timeout=240).until(
         expected.element_not_displayed(
             self.marionette.find_element(By.ID, 'scan-progress')))
开发者ID:jonallengriffin,项目名称:b2gperf,代码行数:9,代码来源:b2gperf.py

示例11: tap_cancel

 def tap_cancel(self):
     actions_menu = Wait(self.marionette).until(
         expected.element_present(*self._actions_menu_locator))
     Wait(self.marionette).until(
         expected.element_displayed(actions_menu))
     self.marionette.find_element(*self._cancel_button_locator).tap()
     Wait(self.marionette).until(
         expected.element_not_displayed(actions_menu))
     self.apps.switch_to_displayed_app()
开发者ID:William-Hsu,项目名称:gaia,代码行数:9,代码来源:activities.py

示例12: tap_edit_save_button

    def tap_edit_save_button(self):
        element = Wait(self.marionette).until(expected.element_present(*self._edit_save_locator))
        Wait(self.marionette).until(expected.element_displayed(element))
        element.tap()
        progress = self.marionette.find_element(*self._save_progress_bar_locator)
        Wait(self.marionette).until(expected.element_not_displayed(progress))
        from gaiatest.apps.gallery.app import Gallery

        return Gallery(self.marionette)
开发者ID:hharchani,项目名称:gaia,代码行数:9,代码来源:edit_photo.py

示例13: tap_import_from_sim

 def tap_import_from_sim(self):
     import_from_sim = Wait(self.marionette).until(
         expected.element_present(*self._import_from_sim_button_locator))
     Wait(self.marionette).until(expected.element_displayed(import_from_sim))
     import_from_sim.tap()
     from gaiatest.apps.contacts.app import Contacts
     status_message = Wait(self.marionette).until(
         expected.element_present(*Contacts._status_message_locator))
     Wait(self.marionette).until(expected.element_displayed(status_message))
     Wait(self.marionette).until(expected.element_not_displayed(status_message))
开发者ID:AutomatedTester,项目名称:gaia,代码行数:10,代码来源:settings_form.py

示例14: share_to_messages

 def share_to_messages(self):
     actions_menu = Wait(self.marionette).until(
         expected.element_present(*self._actions_menu_locator))
     Wait(self.marionette).until(
         expected.element_displayed(actions_menu))
     self.marionette.find_element(*self._messages_button_locator).tap()
     Wait(self.marionette).until(
         expected.element_not_displayed(actions_menu))
     from gaiatest.apps.messages.regions.new_message import NewMessage
     return NewMessage(self.marionette)
开发者ID:William-Hsu,项目名称:gaia,代码行数:10,代码来源:activities.py

示例15: tap_wallpaper

 def tap_wallpaper(self):
     Wait(self.marionette).until(
         expected.element_displayed(*self._actions_menu_locator))
     self.marionette.find_element(*self._wallpaper_button_locator).tap()
     Wait(self.marionette).until(
         expected.element_not_displayed(*self._actions_menu_locator))
     from gaiatest.apps.wallpaper.app import Wallpaper
     wallpaper = Wallpaper(self.marionette)
     Wait(self.marionette).until(lambda m: self.apps.displayed_app.name == wallpaper.name)
     self.apps.switch_to_displayed_app()
     return wallpaper
开发者ID:William-Hsu,项目名称:gaia,代码行数:11,代码来源:activities.py


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