Commit 35652176 by Jesse Zoldak Committed by GitHub

Merge pull request #13249 from edx/zoldak/fix-flaky-video-test

Wait for the transcript file chooser input field to be visible
parents 98a03f68 4a1bc538
......@@ -639,6 +639,8 @@ class VideoComponentPage(VideoPage):
# Show the Browse Button
self.browser.execute_script("$('form.file-chooser').show()")
asset_file_path = self.file_path(transcript_filename)
self.q(css=CLASS_SELECTORS['attach_transcript']).results[0].send_keys(asset_file_path)
attach_css = CLASS_SELECTORS['attach_transcript']
self.wait_for_element_visibility(attach_css, "The file chooser's input field is visible.")
self.q(css=attach_css).results[0].send_keys(asset_file_path)
# confirm upload completion
self._wait_for(lambda: not self.q(css=CLASS_SELECTORS['attach_transcript']).visible, 'Upload Completed')
self._wait_for(lambda: not self.q(css=attach_css).visible, 'Upload Completed')
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