Below is the code am writing in FreeBSD. Before this code, I did
In FreeBSD, what is the environment variable to set ? I read USES = DISPLAY but I couldn't understand as there isn't much of information about it. And because of that the Firefox starts and closes
pkg install xorg-vfbserver
but after this I don't know which environment variable to set. Like in Ubuntu you have to do like this before using this program apt-get install xvfb
export DISPLAY =:1
In FreeBSD, what is the environment variable to set ? I read USES = DISPLAY but I couldn't understand as there isn't much of information about it. And because of that the Firefox starts and closes
Code:
from pyvirtualdisplay importDisplay
from selenium import webdriver
try:
[INDENT]display =Display(visible=0, size=(800,600))
display.start()[/INDENT]
except:
[INDENT]print"no virtual display found"[/INDENT]
driver = webdriver.Firefox()
driver.get('www.google.com')
driver.close()
display.open.terminate()
Last edited: