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

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -