webdriver and Opera 11.64 on windows xp

71 views
Skip to first unread message

GiuseppeC

unread,
Jan 23, 2013, 6:13:53 AM1/23/13
to webd...@googlegroups.com
Guys, help me please with Opera 11.64 on windows XP!:)

....else if(mode.equals("hub") && browser.equals("opera")){

            URL HubUrl;
            try {
                HubUrl = new URL(seleniumHubUrl);
            } catch (MalformedURLException e1) {
                throw new ConfigurationException("The url for the selenium hub is invalid");
            }
            DesiredCapabilities opCapabilities = DesiredCapabilities.opera();
            opCapabilities.setCapability("opera.binary","C:\\Programmi\\Opera\\Opera.exe");
            opCapabilities.setCapability("opera.profile", new OperaProfile());
            opCapabilities.setCapability("opera.port", -1);
            opCapabilities.setCapability("opera.logging.level", "CONFIG");
            opCapabilities.setCapability("opera.logging.file", "C:\\Documents and Settings\\test\\Desktop\\webdriver_script\\operadriver.log");
            opCapabilities.setCapability("opera.display", 8);
            driver = new RemoteWebDriver(HubUrl,opCapabilities);
        }....

This is the error: org.openqa.selenium.WebDriverException: No response in a timely fashion
Build info: version: '2.28.0', revision: '18309', time: '2012-12-11 20:21:18'
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.6.0_35'
Driver info: driver.version: OperaDriver
....
What do I wrong?

Best regards.
GC

Prithvi Raj

unread,
Jan 23, 2013, 7:47:30 AM1/23/13
to webd...@googlegroups.com
Hello Giuseppe,

You dont need to write this complex code for opera and you dont need a OperaStand alone driver. Again you missed the below line in your code:

Try this and make sure you have Opera installed in your remote machine.

                System.out.println("Launching Opera");
                opcapabilities=DesiredCapabilities.opera();
                opcapabilities.setBrowserName(DesiredCapabilities.opera().getBrowserName());

This should work and it worked for me in the past.

Let me know how it goes.

Cheers!!!

Prithvi


--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/iIINZif1Vt0J.
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.

GiuseppeC

unread,
Jan 23, 2013, 9:00:11 AM1/23/13
to webd...@googlegroups.com
DesiredCapabilities opCapabilities = DesiredCapabilities.opera();
opCapabilities.setBrowserName(DesiredCapabilities.opera().getBrowserName());
driver = new RemoteWebDriver(HubUrl,opCapabilities);

Same error....."No response in a timely fashion" :S

Best regards
GC

Prithvi Raj

unread,
Jan 23, 2013, 10:25:04 AM1/23/13
to webd...@googlegroups.com
I am assuming that you could have made this changes. But I am just going through over to double check if there is something wrong(finding where the issue is basically).

Have you made the changes in the json file in your remote machine and add opera with the number of instances you want and the operating system(in your case it is WINDOWS) and launch the node with -nodeConfig webconfig.txt and see if the node is listening to your hub.

This is the code I have used and I could launch opera into a remote Mac machine.


System.out.println("Launching Opera");
                opcapabilities=DesiredCapabilities.opera();
                opcapabilities.setBrowserName(DesiredCapabilities.opera().getBrowserName());
                opcapabilities.setPlatform(org.openqa.selenium.Platform.ANY);

The last thing you want to do is launch the opera browser manually in your remote machine and see if launches.

Follow this steps and see if it works. Let me know if there is any error.
I am also assuming that you have made the changes in the TestNG.xml file.

Cheers




To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/xrCYyH6SgDkJ.

GiuseppeC

unread,
Jan 23, 2013, 10:41:20 AM1/23/13
to webd...@googlegroups.com
Yes of course, I have done like ff, chrome and ie.

GC

GiuseppeC

unread,
Jan 24, 2013, 3:34:28 AM1/24/13
to webd...@googlegroups.com
So works..

DesiredCapabilities opCapabilities = DesiredCapabilities.opera();
opCapabilities.setCapability("opera.binary","C:\\Programmi\\Opera\\Opera.exe");
opCapabilities.setCapability("opera.port", -1);

opCapabilities.setBrowserName(DesiredCapabilities.opera().getBrowserName());
driver = new RemoteWebDriver(HubUrl,opCapabilities);


Raj, where do you set the binary and driver, in the hubconfig or nodeconfig?
Maybe I wrong this, I specify all in the hub instead in each node.

Best regards
GC

Prithvi Raj

unread,
Jan 24, 2013, 3:49:34 AM1/24/13
to webd...@googlegroups.com
Hi Giuseppe,

I dont set the binary at all, be it for FF, Chrome, IE or Opera. If the browser is installed in your target machine then I dont think we would need the binary unless it throws an error asking for it. I send the driver.exe path in nodes where I want to execute.

Did you send it via the hub? If so then please advise. All this days I used to send it via the Hub.

So what was causing the problem in invoking the opera browser?

Thanks

Raj

To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/b8GLMgpO4wEJ.

Prithvi Raj

unread,
Jan 24, 2013, 3:50:56 AM1/24/13
to webd...@googlegroups.com
Correction I used to send the JVM param in node but not in the hub.

GiuseppeC

unread,
Jan 24, 2013, 4:12:02 AM1/24/13
to webd...@googlegroups.com
Ah ok Raj, thanks, I have done more mistakes, infact this is my hub, with bin and driver....:(

HubWebDriver:
title HubWebDriver
java -jar
-Dwebdriver.chrome.bin="C:\Documents and Settings\test\Impostazioni locali\Dati applicazioni\Google\Chrome\Application\chrome.exe"
-Dwebdriver.chrome.driver="C:\Documents and Settings\test\Desktop\webdriver_script\chromedriver.exe"
-Dwebdriver.ie.bin="C:\Programmi\Internet Explorer\iexplore.exe"
-Dwebdriver.ie.driver="C:\Documents and Settings\test\Desktop\webdriver_script\IEDriverServer.exe"
selenium-server-standalone-2.28.0.jar -role hub -hubConfig hubconfig.json
pause


NodeWebDriver:
title NodeWebDriver
java -jar selenium-server-standalone-2.28.0.jar -role node -nodeConfig nodeconfig.json
pause


Opera now works because I have removed from hub this:
opCapabilities.setCapability("opera.binary","C:\\Programmi\\Opera\\Opera.exe");
and insert in java code.

Now I'll try at insert in each node the bin and driver.

Best regards.

Prithvi Raj

unread,
Jan 24, 2013, 12:51:47 PM1/24/13
to webd...@googlegroups.com
I am glad it worked Giuseppe.


Cheers!!!

Raj

--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/D4-4oGrbPp0J.

GiuseppeC

unread,
Jan 28, 2013, 3:42:19 AM1/28/13
to webd...@googlegroups.com
Hi guys.

Opera result-failed Jenkins:
Failed to invoke @Configuration method com.ndg.test.selenium.UITestcase_webdriver.closedriver:Error communicating with the remote browser. It may have died.

Browsers are locked at the first request, what happens?

Best regards.
Reply all
Reply to author
Forward
0 new messages