lundi 11 janvier 2016

Issue in headless testing

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.

http://ift.tt/1OMurUI

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