hope this helps.
-Kathleen
--
You received this message because you are subscribed to the Google Groups
"webdriver" group.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to
webdriver+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/webdriver?hl=en.
don't you stop the Xvfb server after all your tests are finished?
Thanks
Rodrigue
-----Original Message-----
From: webd...@googlegroups.com [mailto:webd...@googlegroups.com] On
Behalf Of sqa tester
Sent: Thursday, July 29, 2010 8:38 PM
To: webdriver
Subject: [webdriver] Re: Continuous Integration and WebDriver !!Urgent!!
keep your scripts the same. You do not need to modify FirefoxWebDriver
to point to command that starts Xvfb.
Instead,
export DISPLAY=":n" --> where n = any integer
start Xvfb on screen n
run your test
When running test headless from ssh, the display needs to be
specified, then you can start Xvfb and it will run it on the display
you specified.
hope this helps.
-Kathleen
On Jul 28, 5:37 pm, Rodrigue <rlag...@googlemail.com> wrote:
--
org.openqa.selenium.WebDriverException: Failed to connect to binary
FirefoxBinary(/usr/local/bin/firefox) on port 7055; process output follows:
?*** e = [Exception... "Component returned failure code: 0x80570016
(NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]" nsresult:
"0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)" location: "JS frame ::
chrome://browser/content/utilityOverlay.js :: getShellService :: line 326"
data: no]
System info: os.name: 'Linux', os.arch: 'i386', os.version:
'2.6.18-028stab064.7', java.version: '1.6.0_20'
Driver info: driver.version: firefox
at
org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(New
ProfileExtensionConnection.java:100)
at
org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:163
)
at
org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:72)
at
org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:141)
at
cm.bao.warehouse.ui.gwt.client.WarehouseGwtUiTestCase.createFirefoxDriver(Wa
rehouseGwtUiTestCase.java:61)
at
cm.bao.warehouse.ui.gwt.client.WarehouseGwtUiTestCase.getParameters(Warehous
eGwtUiTestCase.java:78)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to
connect to host [0:0:0:0:0:0:0:1%1] on port 7055 after 45000 ms
at
org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(New
ProfileExtensionConnection.java:88)
I started in this case as a standalone programm on the server
Pass the Display using an instance of FirefoxBinary
here is the code:
FirefoxBinary firefoxBinary = new FirefoxBinary();
firefoxBinary.setEnvironmentProperty("DISPLAY",
":1");
ProfilesIni allProfiles = new ProfilesIni();
FirefoxProfile profile =
allProfiles.getProfile("default");
DRIVERS.put(WEBDRIVERS_FIREFOX, new
FirefoxDriver(firefoxBinary, profile));
And finally pass the path to firefox by specifying the system variable "
webdriver.firefox.bin"
Yes I'm on selenium 2.0a5? if necessary I could go back to the previous
version.
Many Thanks for all
I got a connection using x11vnc on the server just to see what is going on
there. I could see that during the 45 seconds, the firefox browser was
started, but the webdriver didn't set the url to load.
I think the real problem is that here:
[Exception... "Component returned failure code: 0x80570016
(NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]" nsresult:
"0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)" location: "JS frame ::
chrome://browser/content/utilityOverlay.js :: getShellService :: line 326"
data: no] "
And seems to be independent from webdriver...
I don't know if some people out there already got and solved such a problem
on firefox...
Many Thanks for your help
Rodrigue
-----Original Message-----
From: webd...@googlegroups.com [mailto:webd...@googlegroups.com] On
Behalf Of sqa tester
Sent: Friday, July 30, 2010 1:39 AM
Hudson has a very easy to setup plugin called Xvnc, which does it all for you.
That's what I've been using and it's working great so far.
FK
@Felipe
I'm using Hudson...
Thanks for any help
Rodrigue
-----Original Message-----
From: webd...@googlegroups.com [mailto:webd...@googlegroups.com] On
It takes care of all the boring startup/shutdown process during your build:
Starting xvnc
[workspace] $ vncserver :11
New 'X' desktop is feons:11
Starting applications specified in /home/knorr/.vnc/xstartup
Log file is /home/knorr/.vnc/feons:11.log
[postExample] $ ant -file build.xml deploy
Buildfile: /home/knorr/.hudson/jobs/Post Example/workspace/postExample/build.xml
Trying to override old definition of datatype resources
compile, deploy and test targets invoked
[testng] ===============================================
[testng] Sample Application Tests
[testng] Total tests run: 1, Failures: 0, Skips: 0
[testng] ===============================================
[testng]
BUILD SUCCESSFUL
Total time: 30 seconds
Terminating xvnc.
$ vncserver -kill :11
Killing Xtightvnc process ID 16789
Recording test results
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at PROJECT level
/home/knorr/.hudson/jobs/Post
Example/workspace/postExampleTest/report/html to
/home/knorr/.hudson/jobs/Post Example/htmlreports/HTML_Report
Finished: SUCCESS
Are your tests running OK if you don't try to run them headless?
FK
" Rodrigue, are you using the xvnc plugin?"
no I don't, is it a hudson plugin?
Many Thanks
It's available at the plugin setup page (Manage Hudson -> Manage Plugins).
After installing it, you'll have an option in your project to enable Xvnc.
FK
On Sat, Jul 31, 2010 at 4:17 PM, Rodrigue Lagoue Njinthe
Do you know if it also work with the Xvfb server. I cannot find something
about it on the plugin page... I'm asking it, because the vncserver cannot
be find from the sources configured on my debian lenny server...
Many thanks..
I installed the xvnc plugin, hudson says it starts vnc server, but the
problem still persists...
perhaps it's a problem with firefox installation. What would be strange,
since I can surf on internet with it...
Many thanks
I did it like you mentioned before. My display variable is ":1" but the xvnc plugin start the server at :10
Here is what is printed at start of the hudson job
------------
Starting xvnc
[workspace] $ vncserver :10
New 'X' desktop is myserver.net:10
Starting applications specified in /home/appdir/.vnc/xstartup
Log file is /home/appdir/.vnc/myserver.net:10.log
------------
Here is what is printed when the hudson job is finished
-------
Terminating xvnc.
$ vncserver -kill :10
Killing Xtightvnc process ID 13859
Zeichne Testergebnisse auf.
----------------
I also connected to this display from my client using a vnc client. I can see that firefox get started (Probably from Webdriver), but Webdriver somehow doesn't set the url to the application like it should. The Firefox stays open 45s (the time out) and then get killed.
After all I receive an email with the following error:
-----------
Error Message:
Failed to connect to binary FirefoxBinary(/usr/local/bin/firefox) on port 7055; process output follows: �*** e = [Exception... "Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]" nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)" location: "JS frame :: chrome://browser/content/utilityOverlay.js :: getShellService :: line 326" data: no] System info: os.name: 'Linux', os.arch: 'i386', os.version: '2.6.18-028stab064.7', java.version: '1.6.0_20' Driver info: driver.version: firefox
---------------
Seems like it's a firefox issue. Does anybody already solved such a problem?
Many thanks?
Thanks for your help
" My display variable is ":1" but the xvnc plugin start the server at :10"
I'd suggest that your DISPLAY (in capitals) value should be ":10"
Simon
On Mon, Aug 2, 2010 at 12:41 AM, Rodrigue Lagoue Njinthe
If you launch your tests from Hudson and the xvnc plugin, you don't
need to set the display variable before launching firefox, all
processes spawned by hudson will be redirected to the new display
managed by xvnc.
Since you said you could connect to :10 and see Firefox opening, I
really don't know what else could be wrong.
After searching the group, this seems to be a frequent issue:
https://groups.google.com/group/webdriver/search?group=webdriver&q=7055&qt_g=Search+this+group
I would think that the Firefox extensions are not being installed
properly, but I have no idea how to solve this. Have you tried setting
different profiles?
FK
On Sun, Aug 1, 2010 at 8:15 PM, Rodrigue Lagoue Njinthe
thanks for your replies. I found it nice... I also think I should check the configuration of firefox on my server...
I have just found a workaround with the help of someone who had practically a similar problem.
Why it didn't work?
It seems like the firefox installed on my debian (lenny) headless server doesn't convert from "localhost" to "127.0.0.1" automatically.
The firefox process starts and listen to the address "127.0.0.1:7055" (seen in the output of netstat command), whereas the FirefoxDriver instance tries to make a connection to it using "localhost:7055". The following code from the class FirefoxDriver confirms it:
@Override
protected void startClient() {
LazyCommandExecutor exe = (LazyCommandExecutor) getCommandExecutor();
FirefoxProfile profileToUse = getProfile(exe.profile);
profileToUse.addWebDriverExtensionIfNeeded(false);
// TODO(simon): Make this not sinfully ugly
ExtensionConnection connection = connectTo(exe.binary, profileToUse, "127.0.0.1");
exe.setConnection(connection);
try {
connection.start();
} catch (IOException e) {
throw new WebDriverException("An error occurred while connecting to Firefox", e);
}
}
The solution:
To fix it I just extended the class FirefoxDriver and overrided the #connectTo() method. Since the #startClient() Method uses private classes in it. Here is the code:
--
/**
*
* @author rodrigue
*
*/
public class BaoFirefoxDriver extends FirefoxDriver {
private static final String Localhost = "localhost";
private static final String LocalhostIp = "127.0.0.1";
public BaoFirefoxDriver() {
super();
}
public BaoFirefoxDriver(Capabilities capabilities) {
super(capabilities);
}
public BaoFirefoxDriver(FirefoxBinary binary, FirefoxProfile profile) {
super(binary, profile);
}
public BaoFirefoxDriver(FirefoxProfile profile) {
super(profile);
}
@Override
protected ExtensionConnection connectTo(FirefoxBinary binary,
FirefoxProfile profile, String host) {
String hostToUse = host;
if (Localhost.equalsIgnoreCase(host)) {
hostToUse = LocalhostIp;
}
return super.connectTo(binary, profile, hostToUse);
}
}
------
@Simon
It would be nice to give us a change to change the localhost value more easily.
Thanks again for your help
Hi Thómas,
no I don't (I just checked it)