I've been doing some research into headless testing with Robot Framework and I've come across Xvfb. So I installed it with:
pip install robotframework-xvfb
Then in my test case file, I've added:
*** Settings ***
Library Selenium2Library
Library XvfbRobot
*** Test Cases ***
Creating a headless browser
[Tags] Headless
Starting your display
The user goes to the website
Maximizing the window
The user enters an incorrect email
The user sees they have entered an incorrect email
My keywords are all good, no visible errors. Yet when I run the test, it returns the following:
Importing test library 'XvfbRobot' failed: ImportError: No module named xvfbwrapper
Traceback (most recent call last):
File "/usr/local/Cellar/robot-framework/3.0.2_1/libexec/lib/python2.7/site-packages/XvfbRobot/__init__.py", line 19, in <module>
from xvfbwrapper import Xvfb
Anyone come across this? Thanks in advance!