uezo / TinySeleniumVBA

A tiny Selenium wrapper written in pure VBA
MIT License
60 stars 17 forks source link

It is recommended to increase the configuration browser settings #1

Open xxdoc opened 3 years ago

xxdoc commented 3 years ago

' "capabilities": { ' "firstMatch": { ' "browserName": "chrome", ' "platformName": "any" ' }, ' "alwaysMatch": [ ' { ' "browserName": "chrome", ' "platformName": "any", ' "chromeOptions": { ' "extensions": [], ' "binary": "C:\Users\Administrator\Desktop\loaction\Chrome\1chrome.exe", ' "prefs": { ' "profile": { ' "managed_default_content_settings": { ' "images": 2, ' "popups": 0 ' }, ' "default_content_setting_values": { ' "sound": 2 ' } ' }, ' "download": { ' "default_directory": "C:\Users\Administrator\Desktop\chromcontrol", ' "directory_upgrade": true, ' "prompt_for_download": true ' }, ' "savefile": { ' "default_directory": "C:\Users\Administrator\Desktop\chromcontrol" ' } ' }, ' "args": [] ' } ' } ' ] ' }, ' "desiredCapabilities": { ' "browserName": "chrome", ' "version": " ", ' "platform": "ANY", ' "chromeOptions": { ' "extensions": [], ' "binary": "C:\Users\Administrator\Desktop\loaction\Chrome\1chrome.exe", ' "prefs": { ' "profile": { ' "managed_default_content_settings": { ' "images": 2, ' "popups": 0 ' }, ' "default_content_setting_values": { ' "sound": 2 ' } ' }, ' "download": { ' "default_directory": "C:\Users\Administrator\Desktop\chromcontro\nl", ' "directory_upgrade": true, ' "prompt_for_download": true ' }, ' "savefile": { ' "default_directory": "C:\Users\Administrator\Desktop\chromcontrol" ' } ' }, ' "args": [ ' "--disable-infobars", ' "--disable-javascript", ' "--window-size=500,400" ' ] ' } ' } '} ‘==================================================== ’you can add mChromeOption = "{'capabilities':{'alwaysMatch':{'browserName':'chrome','platformName':'any'},'firstMatch':[{'browserName':'chrome'," mChromeOption = mChromeOption & "'loggingPrefs':{'browser':'ALL','driver':'ALL','performance':'ALL'},'platformName':'any','chromeOptions':{'extensions':[], " mChromeOption = mChromeOption & "'perfLoggingPrefs':{'enableNetwork':true},'prefs':{'last_clear_browsing_data_tab':1, " mChromeOption = mChromeOption & "'browser':{'check_default_browser':false,'clear_data':{'browsing_history_basic':true,'cache_basic':true,'cookies_basic':true}}, " mChromeOption = mChromeOption & "'profile':{'managed_default_content_settings':{'images':1,'popups':1},'default_content_setting_values':{'sound':1}}, " mChromeOption = mChromeOption & "'download':{'default_directory':'C:\','directory_upgrade':true,'prompt_for_download':true}, " mChromeOption = mChromeOption & "'savefile':{'default_directory':'C:\'}},'args':[]}}]},'desiredCapabilities':{'browserName':'chrome', " mChromeOption = mChromeOption & "'proxy':{'proxyType':'system','autodetect':'false','httpProxy':'127.0.0.1:8080','ftpProxy':'127.0.0.1:8080','sslProxy':'127.0.0.1:8080','noProxy':'','socksUsername':'cake','socksPassword':'madewithcake'}," mChromeOption = mChromeOption & "'version':'','loggingPrefs': " mChromeOption = mChromeOption & " {'browser':'ALL','driver':'ALL','performance':'ALL'}, " mChromeOption = mChromeOption & "'platform':'ANY','chromeOptions':{'extensions':[],'prefs':{'last_clear_browsing_data_tab':1, " mChromeOption = mChromeOption & "'browser':{'check_default_browser':false,'clear_data':{'browsing_history_basic':true,'cache_basic':true,'cookies_basic':true}}, " mChromeOption = mChromeOption & "'profile':{'managed_default_content_settings':{'images':1,'popups':1},'default_content_setting_values':{'sound':1}}, " mChromeOption = mChromeOption & "'download':{'default_directory':'C:\','directory_upgrade':true,'prompt_for_download':true},'savefile':{'default_directory':'C:\'}}, " mChromeOption = mChromeOption & "'args':['--disable-infobars','--disable-javascript','--window-size=600,500']}}}" Debug.Print Replace$(mChromeOption, "'", Chr(34))

uezo commented 3 years ago

Hi @xxdoc , Sounds nice, thank you! Will you give me URL or something to confirm the spec of browser settings?

xxdoc commented 3 years ago

https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocolhttps://sites.google.com/a/chromium.org/chromedriver/capabilities