Below is the code am writing in FreeBSD. Before this code, I did
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
from pyvirtualdisplay import Display
from selenium import webdriver
try:
display = Display(visible=0, size=(800,600))
display.start()
except:
print "no virtual display found"
driver = webdriver.Firefox()
driver.get('www.google.com')
driver.close()