I have written a code in java using selenium web driver . I need to run that jar on GOOGLE COMPUTE 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.
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);
Aucun commentaire:
Enregistrer un commentaire