Fix CSS selector under Python 3 BOM-991 (#22124)

This commit is contained in:
Jeremy Bowman
2019-10-24 13:19:18 -04:00
committed by GitHub
parent a384e753fd
commit 05e9e56d56
3 changed files with 3 additions and 5 deletions

View File

@@ -660,7 +660,7 @@ class XBlockWrapper(PageObject):
@property
def editor_selector(self):
return '.xblock-studio_view'
return u'.xblock-studio_view'
def _click_button(self, button_name):
"""

View File

@@ -25,8 +25,6 @@ class AcidView(PageObject):
is on the page.
"""
super(AcidView, self).__init__(browser)
if isinstance(context_selector, six.text_type):
context_selector = context_selector.encode('utf-8')
self.context_selector = context_selector
def is_browser_on_page(self):

View File

@@ -12,7 +12,7 @@ def wait_for_xblock_initialization(page, xblock_css):
"""
def _is_finished_loading():
# Wait for the xblock javascript to finish initializing
is_done = page.browser.execute_script(u"return $({!r}).data('initialized')".format(xblock_css))
return (is_done, is_done)
is_done = page.browser.execute_script(u"return $('{}').data('initialized')".format(xblock_css))
return is_done, is_done
return Promise(_is_finished_loading, 'Finished initializing the xblock.').fulfill()