Naresh Kumar
Naresh Kumar

Reputation: 33

Selenium Add-on/Extension in Chrome Browser

How to execute Add-on automatically in Chrome, Is there any shortcut key to execute.?

// In below lines i am adding .crx file and after that loading into chrome browser

chrome_options.add_extension("/path/.crx");

driver=webdriver.Chrome(chrome_options=chrome_options)

So, What is happening after Add-on loaded we have to click plugin icon to activate and perform operation. But i need to activate without click into plugin icon.

Upvotes: 1

Views: 783

Answers (1)

emporerblk
emporerblk

Reputation: 1066

Always read the docs first!

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

coptions = Options()
coptions.add_extension("path/to/extension/file.crx")
driver = webdriver.Chrome(chrome_options=coptions)

Upvotes: 1

Related Questions