Rishabh Anand
Rishabh Anand

Reputation: 95

Using selenium chrome browser in background (not headless mode)?

I want to run my python script which uses selenium to do some work. I need to test the code repeatedly and need to use the terminal as well. Thus the chrome window bugs me when it opens up in the foreground everytime. Also, I can't use the headless mode since my script crashes.

Is there any solution for this ??

Upvotes: 4

Views: 2361

Answers (1)

Feuermann
Feuermann

Reputation: 344

You can minimize window after selenium started

from selenium import webdriver

driver = webdriver.Chrome()
driver.minimize_window
driver.get("your_pages")

Upvotes: 5

Related Questions