Commit ff4f0787 by Jesse Zoldak

Merge pull request #6522 from edx/zoldak/video-troubleshooting

Add debug logging to video tests
parents 03d20e09 e77acdf4
......@@ -9,6 +9,8 @@ from bok_choy.page_object import PageObject
from bok_choy.promise import EmptyPromise, Promise
from bok_choy.javascript import wait_for_js, js_defined
import logging
log = logging.getLogger('VideoPage')
VIDEO_BUTTONS = {
'CC': '.hide-subtitles',
......@@ -661,6 +663,11 @@ class VideoPage(PageObject):
state_selector = self.get_element_selector(CSS_CLASS_NAMES['video_container'])
current_state = self.q(css=state_selector).attrs('class')[0]
# For troubleshooting purposes show what the current state is.
# The debug statements will only be displayed in the event of a failure.
logging.debug("Current state of '{}' element is '{}'".format(state_selector, current_state))
# See the JS video player's onStateChange function
if 'is-playing' in current_state:
return 'playing'
elif 'is-paused' in current_state:
......
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