I am trying to use selenium webdriver to save a specific image in a directory. I wanted to do this by simulating a right click on the img element and selecting "save image as ...". With the following code, I can open the context menu, but I cannot select the correct option.
browser = WebDriver(executable_path=CHROMEDRIVER_PATH)
browser.get(URL)
img = browser.find_element_by_tag_name('img')
ActionChains(browser).context_click(img).perform()
I also tried:
ActionChains(browser).context_click(img).send_keys(Keys.ARROW_DOWN).send_keys(Keys.ENTER).perform()
and using the shortcut ('v' seems to select "save image as ...")
ActionChains(browser).context_click(img).send_keys('v').perform()
URL-, , . , , , - ( " ..." ). , .
?