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:

  1. start xvfb following options:

    $ xvfb :89 -ac -noreset

    (where :89 virtual "display" created).

  2. then, set display variable virtual display:

    $ export display=:89

  3. at 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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -