ruby - How to make context menu disappear? -
let's use 'ask question' button of http://www.stackoverflow.com question.
suppose, perform context click on 'ask question' button, it'll result appearance of context menu.
btn_ask_question = driver.find_element(:css, '.nav.askquestion li') driver.action.context_click(btn_ask_question).perform
now, want context menu disappear. how can achieve using selenium webdriver ruby? release method doesn't work.
following context menu image:
i don't think there built-in handling system level context menu.
the easiest might try find body element, click body.
driver.find_element(:css, 'body').click
Comments
Post a Comment