Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

hide window in selenium Webdriver python

from selenium import webdriver 
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
#chrome_options.add_argument("--disable-extensions")
#chrome_options.add_argument("--disable-gpu")
#chrome_options.add_argument("--no-sandbox") # linux only
chrome_options.add_argument("--headless")
# chrome_options.headless = True # also works
driver = webdriver.Chrome(options=chrome_options)
start_url = "https://duckgo.com"
driver.get(start_url)
print(driver.page_source.encode("utf-8"))
driver.quit()
# b'<!DOCTYPE html><html xmlns="http://www....
Comment

PREVIOUS NEXT
Code Example
Python :: find element by title selenium python 
Python :: export image png python 
Python :: ind vs wi 
Python :: get list of folders in directory python 
Python :: python reload import 
Python :: pip.exe The system cannot find the file specified 
Python :: show image in tkinter pillow 
Python :: export data csv python 
Python :: python easter eggs 
Python :: python get all variables in class 
Python :: how to split and keep delimiter at the same line in python 
Python :: python strip non numeric in string 
Python :: create a window turtle python 
Python :: jalali date to gregorian date 
Python :: ValueError: cannot mask with array containing NA / NaN values 
Python :: auto clicker in python 
Python :: argparse boolean default 
Python :: pandas how to get last index 
Python :: hyperlinks in jupyter notebook 
Python :: how to put a text file into a list python 
Python :: plt tight layout 
Python :: remove all 0 from list python 
Python :: flask get ip address of request 
Python :: python write to command prompt 
Python :: open image in numpy 
Python :: setwd python 
Python :: open image from link python 
Python :: python - give a name to index column 
Python :: remove help command discord py 
Python :: pandas set a column as index 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =