I'm little bit struggling to find the correct way to perform a right click.
Here is a sample of my code:
click_Menu = driver.find_element_by_id("Menu")
print(click_Menu.text)
action.move_to_element(click_Menu)
action.context_click(on_element=click_Menu)
action.perform()
All the imports are there.And
print(click_Menu.text
) => returns "Menu", so the element has been found
Error :
selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document
I tried to add time.sleep()
but the result is the same.
Any ideas please ?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…