Instantly share code, notes, and snippets.

Embed
What would you like to do?
def mouse_over_and_click_menu(self, menu, menu_row):
self.wait_until_not_stale_element_is_visible(menu)
self.short_sleep()
menu_elem = self.get_webelement(menu)
actions = ActionChains(self.driver)
if self._is_hamburger_visible():
hamburger = self.get_webelement("hamburger")
actions.move_to_element(hamburger).click()
actions.perform()
self.short_sleep()
actions = ActionChains(self.driver)
import pdb;pdb.set_trace()
menu_row_elem = self.get_webelement(menu_row)
actions.move_to_element(menu_elem)
actions.w3c_actions.pointer_action.pause(3)
actions.move_to_element(menu_row_elem)
actions.click(menu_row_elem)
actions.w3c_actions.pointer_action.pause(3)
actions.perform()
self.log("clicking on {}".format(menu_row))
self.longer_sleep()
return self
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment