I am trying to se a Mac (MacOS 10.13.3) to run selenium tests in an headless environment. I am doing basically the following:
from pyvirtualdisplay impot Display
display = Display(visible=0, size=(13660, 7680))
display.start()
before invoking the selenium webdriver (selenum 3.8.0). However, I get the following error:
self = <EasyProcess cmd_param=['Xvfb', '-help'] cmd=['Xvfb', '-help'] oserror=[Errno ... directory return_code=None stdout="None" stderr="None" timeout_happened=False>
def check_installed(self):
"""Used for testing if program is installed.
Run command with arguments. Wait for command to complete.
If OSError raised, then raise :class:`EasyProcessCheckInstalledError`
with information about program installation
:param return_code: int, expected return code
:rtype: self
"""
try:
self.call()
except Exception:
> raise EasyProcessCheckInstalledError(self)
E EasyProcessCheckInstalledError: cmd=['Xvfb', '-help']
E OSError=[Errno 2] No such file or directory
E Program install error!
venv_pytest/lib/python2.7/site-packages/easyprocess/__init__.py:180: EasyProcessCheckInstalledError
Because it looks like an issue with xvfb
I tried to install it:
>pip install xvfb
Collecting xvfb
Could not find a version that satisfies the requirement xvfb (from versions: )
No matching distribution found for xvfb
I also tried the following:
>brew install xvfb
Error: No available formula with the name "xvfb"
What else can I try?
Addendum: I am not loking for something else. I am looking to make the above work on a Mac to develop the tests. The tests will run in a sane Linux environment (of course not Mac!!) which is perfectly settled to work with xvfb
...