Question
I want to add a custom bookmarklet (bookmark that is pure JavaScript code) to a webdriver so it appears in the bookmarks toolbar. This can either be at creation time via add_extension, or after page load.
How can I add this bookmarklet to bookamrks toolbar WITHOUT user interaction, and WITHOUT loading a profile? Any ideas welcomed
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_extension(r'C:\path\to\extension.crx')
# Have tried the below but doesn't open the add page to bookmarks?
"""actions = ActionChains(driver)
actions.send_keys(Keys.CONTROL + 'd')
actions.perform()
"""