close

How to hide Chrome Driver in python?

Hello Guys, How are you all? Hope You all Are Fine. Today We Are Going To learn about How to hide Chrome Driver in python in Python. So Here I am Explain to you all the possible Methods here.

Without wasting your time, Let’s start This Article.

Table of Contents

How to hide Chrome Driver in python?

  1. How to hide Chrome Driver in python?

    You can move browser window over the monitor, like this:
    driver.set_window_position(-10000,0)

  2. hide Chrome Driver in python

    You can move browser window over the monitor, like this:
    driver.set_window_position(-10000,0)

Method 1

You can move browser window over the monitor, like this:

driver.set_window_position(-10000,0)

Method 2

I think it will work.

from selenium import webdriver

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('headless')
chrome_options.add_argument('window-size=1920x1080')
chrome_options.add_argument("disable-gpu")
driver = webdriver.Chrome('chromedriver', chrome_options=chrome_options)

driver.get('http://google.com')
print(driver.title)
driver.implicitly_wait(3)
driver.get_screenshot_as_file('googleHomePage.png')

driver.quit()

Summery

It’s all About this issue. Hope all Methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which Method worked for you? Thank You.

Also, Read