Python Chrome Selenium Python selenium solves the problem that chrome://settings cannot be located Great God answers: stackoverflow-56763683 stackoverflow-56380091 Implementation example Clear browsing history button 1 return document.querySelector('settings-ui').shadowRoot.querySelector('settings-main').shadowRoot.querySelector('settings-basic-page').shadowRoot.querySelector('settings-section > settings-privacy-page ').shadowRoot.querySelector('settings-clear-browsing-data-dialog').shadowRoot.querySelector('#clearBrowsingDataDialog').querySelector('#clearBrowsingDataConfirm') Added sound button 1 return document.querySelector('settings-ui').shadowRoot.querySelector('settings-main').shadowRoot.querySelector('settings-basic-page').shadowRoot.querySelector('settings-privacy-page').shadowRoot .querySelector('settings-animated-pages > settings-subpage > category-setting-exceptions').shadowRoot.querySelector('site-list').shadowRoot.querySelector('#addSite') Added sound button 1 return document.querySelector('settings-ui').shadowRoot.querySelector('settings-main').shadowRoot.querySelector('settings-basic-page').shadowRoot.querySelector('settings-privacy-page').shadowRoot .querySelector('settings-animated-pages > settings-subpage > category-setting-exceptions').shadowRoot.querySelector('site-list').shadowRoot.querySelector('add-site-dialog').shadowRoot.querySelector( '#site').shadowRoot.querySelector('#input') Added sound confirmation button 1 return document.querySelector('settings-ui').shadowRoot.querySelector('settings-main').shadowRoot.querySelector('settings-basic-page').shadowRoot.querySelector('settings-privacy-page').shadowRoot .querySelector('settings-animated-pages > settings-subpage > category-setting-exceptions').shadowRoot.querySelector('site-list').shadowRoot.querySelector('add-site-dialog').shadowRoot.querySelector( '#add') ##Python: 1 2 3 clearButton = browser.execute_script("return document.querySelector('settings-ui').shadowRoot.querySelector('settings-main').shadowRoot.querySelector('settings-basic-page').shadowRoot.querySelector('settings- privacy-page').shadowRoot.querySelector('settings-animated-pages > settings-subpage > category-setting-exceptions').shadowRoot.querySelector('site-list').shadowRoot.querySelector('#addSite')" ) #click on the clear button now clearButton.click()