Commit ebee3c40 by Muhammad Ammar

Fix Video Player Pause Issue

parent 70d47fb5
...@@ -349,6 +349,11 @@ class VideoPage(PageObject): ...@@ -349,6 +349,11 @@ class VideoPage(PageObject):
""" """
button_selector = self.get_element_selector(VIDEO_BUTTONS[button]) 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() self.q(css=button_selector).first.click()
button_states = {'play': 'playing', 'pause': 'pause'} 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