Headless Selenium + Xvfb + Chrome on OSX 10.11

Okay, so first I learned that Xvfb wasn't included with my OS X version, so I installed it from http://www.xquartz.org/.

and that seemed to have worked:

which xvfb
/opt/X11/bin/xvfb

But when I try using it with either pyvirtualdisplay and xvfbwrapper, following advice I found on this question How do I run Selenium in Xvfb? My script runs without errors but just opens in a Chrome browser window:

from selenium import webdriver
from pyvirtualdisplay import Display

display = Display(visible=0, size=(800, 600))
display.start()

browser = webdriver.Chrome()
browser.get('google.com')

Am I doing something wrong here?

Answers


I believe that Chrome is built for Quartz ui framework, so it ignores the X11 windowing engine. You will need to install an X11 version of a browser and then execute that.


Need Your Help

RequiredPageContentNotPresent error in geb 0.12.2

eclipse maven groovy geb cucumber-jvm

I am getting the following error when trying to run a geb test as a part of a Maven build in Eclipse:

how to make other ajax calls after one ajax call completes and second ajax call should not call the .stop function

jquery ajax

actually i 'm calling multiple ajax calls but i want some ajax calls completes first and exectute the atsk defined in its stop function.but some ajax call should be made once function defined in stop