Python selenium executing add-on -


chop = webdriver.chromeoptions() prefs = {"download.default_directory" : desire_save_path} chop.add_experimental_option("prefs",prefs) chop.add_extension(file_location) driver = webdriver.chrome(chromedriverpath, chrome_options = chop) 

i've created .crx file make chrome load add-on when launches. next, want make click add-on button @ top right corner make execute. able using pyautogui make manually click it. however, i'd rather not have program clicking on place. there better way? if point me right direction, that'd great.

thank much

if want run chrome-extension in browser, don't need click it's icon extensions panel, can run manually @ first , when extension page loaded save it's url variable. should looks like

extension_url = 'chrome-extension://just_sequence_of_symbols/addon_name.html' 

and can run automatically:

chop = webdriver.chromeoptions() prefs = {"download.default_directory" : desire_save_path} chop.add_experimental_option("prefs",prefs) chop.add_extension(file_location) driver = webdriver.chrome(chromedriverpath, chrome_options = chop) driver.get(extension_url) 

Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

sql server - SQL Query returns one result, does not return 0 or NULL result -