Commit fc285ee4 by Jesse Zoldak

Merge pull request #4864 from edx/ammar/fix-pause-state-promise-broken-issue

Fix Video Player Pause Issue
parents a3c2a54b ebee3c40
......@@ -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'}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment