My goal is to disable JavaScript loading of a page to get the data that appears before loading and compare it with the data after loading.
Im using:
- Selenium version 3.141.0
- Python 3.6.8
- Chromedriver 83.0.4103.39
- macOS Catalina 10.15.5
I have tried to use this, but it does not work in my case:
options.add_experimental_option(
"prefs", {'profile.managed_default_content_settings.javascript': 2})
and this:
prefs = {'profile.default_content_setting_values': {'cookies': 2, 'images': 2, 'javascript': 2,
'plugins': 2, 'popups': 2, 'geolocation': 2,
'notifications': 2, 'auto_select_certificate': 2, 'fullscreen': 2,
'mouselock': 2, 'mixed_script': 2, 'media_stream': 2,
'media_stream_mic': 2, 'media_stream_camera': 2, 'protocol_handlers': 2,
'ppapi_broker': 2, 'automatic_downloads': 2, 'midi_sysex': 2,
'push_messaging': 2, 'ssl_cert_decisions': 2, 'metro_switch_to_desktop': 2,
'protected_media_identifier': 2, 'app_banner': 2, 'site_engagement': 2,
'durable_storage': 2}}
I have been looking for more ways to get it but without success, I hope someone knows another solution that works