I
I
Ivan Yakushenko2019-05-22 19:09:05
Python
Ivan Yakushenko, 2019-05-22 19:09:05

Is it possible to run Selenium in the background?

When the selenium application is launched, the browser is also launched, is it possible to make the browser run "in the background"?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Fedorov, 2019-05-22
@kshnkvn

It is possible without a browser at all, in headless mode, that is, there is drawing, but in memory, and it does not reach direct rendering. That is, screenshots will also work, everything is the same, but without launching the GUI.
A flag is needed --headless, see the doc for the web driver for your framework

M
Maria Dyakova, 2019-05-23
@mdyakovaml

If you write in Python, then I use the following code:
options = webdriver.FirefoxOptions()
options.set_headless(True)
browser = webdriver.Firefox(options=options)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question