I have a chrome extension which when activated (clicked or keyboard-shortcut ) parses some data from the given site and sends it to my server. I need to automate this task to run daily at a specific time most preferably in headless mode.
The extension was loaded using a .crx file. The extension can be activated by clicking the extension icon or by pressing the alt+p keyboard shortcut.alt+p. Trying to simulate the keypress using Selenium doesn't seem to work, but other keyboard shortcuts, like ctrl+A, do.
from selenium.webdriver.common.action_chains import ActionChains
keyAction = ActionChains(driver)
keyAction.key_down(Keys.ALT).send_keys("p").key_up(Keys.ALT)
How to effectively simulate this shortcut? Is there any other way I can activate this extension?