Skip to content

Instantly share code, notes, and snippets.

@prince-mishra
Created April 12, 2020 13:36
Show Gist options
  • Select an option

  • Save prince-mishra/aac831408224f15c59917614eef4f6fb to your computer and use it in GitHub Desktop.

Select an option

Save prince-mishra/aac831408224f15c59917614eef4f6fb to your computer and use it in GitHub Desktop.
run chrome in pyvirtualdisplay
from pyvirtualdisplay import Display
from selenium import webdriver
display = Display(visible=0, size=(800, 600))
display.start()
# now Chrome will run in a virtual display.
# you will not see the browser.
browser = webdriver.Chrome()
browser.get('http://www.google.com')
print browser.title
browser.quit()
display.stop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment