exception - Selenium and Headless Environment -
i installed python 2.7, robot framework , selenium library (i still don't know if succeded though...) on red hat server run test on web application.
so tried simple test case using robot framework see if selenium library functional, open web page, nothing more...
selenium server , running according result of ps, , firefox binaries in path...
running test case robot framework (with pybot testcasename.tsv) exception: error: problem capturing screenshot string: java.awt.awtexception: headless environment
so, headless environment? have idea if there else needs istalled or configured well?
using x virtual frame buffer (xvfb):
we can use xvfb create headless environment selenium (for example, run on ssh).
instructions:
start
xvfbfollowing options:$ xvfb :89 -ac -noreset(where
:89virtual "display" created).then, set
displayvariable virtual display:$ export display=:89at point, can run selenium server desired. examples follow.
run server java archive:
$ java -jar selenium-server.jar
in python:
from selenium import webdriver driver = webdriver.firefox() ...
Comments
Post a Comment