I guess you mean headless as it called.
but
Otherwise there is no point to use Selenium(which should be used if need eg JavaScript,otherwise not).
from selenium.webdriver.firefox.options import Options #-- Setup options = Options() options.add_argument("--headless") browser = webdriver.Firefox(firefox_options=options, executable_path=r"path to geckodriver") #-- Parse browser.get('url') title = browser.find_element_by_xpath('//title') print(t.text) #browser.quit()So code over use selenium to parse,if use BeautifulSoup to parse you send code from selenium,you don't use
urlopen(url)
,but
browser.page_source
.Otherwise there is no point to use Selenium(which should be used if need eg JavaScript,otherwise not).
# Give source code to BeautifulSoup soup = BeautifulSoup(browser.page_source, 'lxml') welcome = soup.select('head > title') print(welcome.text)