0

I want my browser to look like this

enter image description here

only text no image at all

i tried

options.experimental_options["prefs"] = chrome_prefs
chrome_prefs["profile.default_content_settings"] = {"images": 2}
chrome_prefs["profile.managed_default_content_settings"] = {"images": 2}

it only disabled images but not disabled ui on the site

any help??

dlrPaud
  • 45
  • 4
  • Did you try these solutions? https://stackoverflow.com/questions/50240886/disable-css-and-image-in-selenium-chromedriver-python https://stackoverflow.com/questions/49031428/how-to-disable-css-in-python-selenium-using-chromeoptions – Idan Perry Nov 09 '21 at 12:08

1 Answers1

0

Change the code to this

from selenium import webdriver

chrome_options = webdriver.ChromeOptions()
chrome_prefs = {"profile.managed_default_content_settings.images": 2}
chrome_options.add_experimental_option("prefs", chrome_prefs)
driver = webdriver.Chrome(chrome_options=chrome_options)

or you can use the chrome extension 'Block Image' from extension downloader. This link will be helpful for you Disable images in Selenium Google ChromeDriver

Talal Siddiqui
  • 106
  • 1
  • 7