Home > OS >  Trying to access an internal page from browser which doesn't have a url format ex: chrome://set
Trying to access an internal page from browser which doesn't have a url format ex: chrome://set

Time:02-12

I am trying to analyze the html of chrome://settings and create a pop out window with toggled settings as a floating sidebar. I can't seem to link to chrome://settings because its not in URL format I have tried using requests , selenium , and beautiful soup.

How should I go about accessing the html documents from an internal page such as chrome://settings

CodePudding user response:

You need to pass chrome://settings as the url: str through get()as an argument as follows:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service

options = Options()
options.add_argument("start-maximized")
s = Service('C:\\BrowserDrivers\\chromedriver.exe')
driver = webdriver.Chrome(service=s, options=options)
driver.get('chrome://settings')

Browser Snapshot:

chrome_settings

  • Related