0

I have written a code in java using selenium web driver. I need to run that jar on the Google Computer Engine. I want headless testing so I have written below code for headless Firefox browser. Below is the link from where I got this idea.

http://www.seleniumtests.com/2012/04/headless-tests-with-firefox-webdriver.html

But still when I executed in GCE the browser is opening. Can someone please help?

String Xport = System.getProperty("lmportal.xvfb.id", ":1");
final File firefoxPath = new File(System.getProperty("lmportal.deploy.firefox.path", "/usr/bin/firefox"));
FirefoxBinary firefoxBinary = new FirefoxBinary(firefoxPath);
firefoxBinary.setEnvironmentProperty("DISPLAY", Xport);

driver = new FirefoxDriver(firefoxBinary, null);
Mukesh Takhtani
  • 852
  • 5
  • 15

0 Answers0