Flávio Schuindt
Flávio Schuindt

Reputation: 503

Redirect output to a specific monitor in selenium

Is there any possibility to redirect output to a specific monitor using selenium? What I want to do is open a browser in a "virtual monitor" and do the tasks without user see anything (browser, images, click, etc.). Also, I'm using Splinter (a wrapper on to of selenium).

Upvotes: 1

Views: 356

Answers (1)

Furious Duck
Furious Duck

Reputation: 2019

@Mark Rowlands gave nice tip. But if you want to use Chrome or Firefox I would recommend pyvirtualdisplay. After downloading the lib:

from pyvirtualdisplay import Display
## before launching the driver instance
display = Display(visible=0, size=(1920, 1080)) ## There're few more options
display.start()

Upvotes: 2

Related Questions