1

Is it possible to add_argument once the driver is initialized,

#This works perfectly fine

unpacked_extension_path = '/path/to/unpacked/extension/'
options = Options() 
options.add_argument('--load-extension={}'.format(unpacked_extension_path))
driver = webdriver.Chrome(options=options)

But I want to load add_argument after the driver is initiated anyone can please help me here.

I tried like this

unpacked_extension_path = '/path/to/unpacked/extension/'
options = Options() 
driver = webdriver.Chrome(options=options)
driver.options.add_argument('--load-extension={}'.format(unpacked_extension_path))

But It doesnt work, can anyone please help

0 Answers0