Skip to content

Instantly share code, notes, and snippets.

@mcfunley
Created March 9, 2010 21:15
Show Gist options
  • Save mcfunley/327122 to your computer and use it in GitHub Desktop.
Save mcfunley/327122 to your computer and use it in GitHub Desktop.
@use_selenium
def test_search_box_gets_focus_after_selecting_search_type(self):
self.se.open('/')
self.se.click(self.search_facet)
self.wait_for_facet_dropdown()
self.se.click(self.facet(1))
self.wait_for_facet_dropdown_cleared()
try:
path = self.search_input[:-1] + ' and contains(@class, "focus")]'
self.html.select_one(path)
except AssertionError:
self.fail('The search box did not receive focus '
'after selecting a facet. ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment