Fix Video Player Pause Issue

This commit is contained in:
Muhammad Ammar
2014-08-18 13:16:25 +00:00
parent 70d47fb54d
commit ebee3c406e

View File

@@ -349,6 +349,11 @@ class VideoPage(PageObject):
"""
button_selector = self.get_element_selector(VIDEO_BUTTONS[button])
# If we are going to click pause button, Ensure that player is not in buffering state
if button == 'pause':
self.wait_for(lambda: self.state != 'buffering', 'Player is Ready for Pause')
self.q(css=button_selector).first.click()
button_states = {'play': 'playing', 'pause': 'pause'}