I need to do the following 1)Right click on a element 2) Context menu is displayed 3) On moving to a specific menu (move_to_element) in context menu - pops up 4) Need to click on MenuX I am able to do steps 1 to 3 but not 4. When I checked is_displayed for MenuX it returns False When I try driver.find_element_by_xpath("html/body/div[5]/span[2]") it works (I do not want to hardcode) But not with id of menu. I also tried driver.find_element_by_css_selector("div#contextMenu_Div #menuX") and it didnt work menuX is not link but a span element. Any suggestions |
actions = ActionChains(driver)
actions.move_to_element(menu)
actions.click(hidden_submenu)