Invoking the RemoteWebDriver server component

49 views
Skip to first unread message

Jim Evans

unread,
Dec 10, 2009, 7:14:21 AM12/10/09
to webdriver
I'm working on the .NET bindings for WebDriver, and am working on the
RemoteWebDriver client implementation. I need to instantiate a server
instance for testing purposes, but I'm unsure how to do that. I don't
think I can just start up the .jar for the remote web server, can I? I
need some sort of host. Does someone have a step-by-step tutorial on
how to set this up? The wiki page talks about how to instantiate the
server from within other Java code, and there is a bit on the Python
bindings page about a server, but I must be missing something
(jetty?).

I suppose I could rewrite the server component in C#, and that may be
good to do in the future, but that really seems like a lot of extra
work at this point, not to mention it smacks of reinventing the wheel.

--Jim

Simon Stewart

unread,
Dec 10, 2009, 10:29:26 AM12/10/09
to webd...@googlegroups.com
Hi Jim,

Good question. I tend to have a Java IDE up with the server running in
that, by calling the 'InProcessTestEnvironment' main method. We could
probably create a test target that builds an 'uberjar' with the main
method set, so all you would need to do would be a 'java -jar
uber.jar' to get it running.

Sound good?

Cheers,

Simon
> --
>
> 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.
>
>
>

Jim Evans

unread,
Dec 10, 2009, 11:22:26 AM12/10/09
to webdriver
That would be a great addition to things. I don't think I even have a
Java IDE installed right now. I need to try to test the .NET bindings
for RemoteWebDriver, and I'm dead in the water without a server.

--Jim
> > For more options, visit this group athttp://groups.google.com/group/webdriver?hl=en.- Hide quoted text -
>
> - Show quoted text -

Jari Bakken

unread,
Dec 10, 2009, 11:38:17 AM12/10/09
to webd...@googlegroups.com
On Thu, Dec 10, 2009 at 4:29 PM, Simon Stewart
<simon.m...@gmail.com> wrote:
> Hi Jim,
>
> Good question. I tend to have a Java IDE up with the server running in
> that, by calling the 'InProcessTestEnvironment' main method. We could
> probably create a test target that builds an 'uberjar' with the main
> method set, so all you would need to do would be a 'java -jar
> uber.jar' to get it running.
>
> Sound good?
>

Have you considered a release target that builds a remote server jar
with the main method set? Sounds useful for Ruby users as well. Or
does everyone have to know how to set up a Java servlet container to
run the remote server?

Jari

Simon Stewart

unread,
Dec 10, 2009, 11:39:19 AM12/10/09
to webd...@googlegroups.com
OK. I'm adding that to the list of Good Things To Do today.

Simon

Simon Stewart

unread,
Dec 10, 2009, 11:40:25 AM12/10/09
to webd...@googlegroups.com
We have the "selenium-server-standalone" target, which builds the
standalone server, but it doesn't have all the testing stuff shoved
into it.

Simon

Jari Bakken

unread,
Dec 10, 2009, 1:44:12 PM12/10/09
to webd...@googlegroups.com
On Thu, Dec 10, 2009 at 5:40 PM, Simon Stewart
<simon.m...@gmail.com> wrote:
>
> We have the "selenium-server-standalone" target, which builds the
> standalone server, but it doesn't have all the testing stuff shoved
> into it.
>

Ah, got it. I'm seeing 403 forbidden messages when I try to use for
WebDriver though, with both the Java and the Ruby client:

org/openqa/selenium/remote/RemoteWebDriver.java:428:in
`throwIfResponseFailed': java.lang.RuntimeException: <html>
(NativeException)
<head>
<title>Error 403 Forbidden for Proxy</title>
</head>
<body>
<h2>HTTP ERROR: 403</h2><pre>Forbidden for Proxy</pre>
<p>RequestURI=/wd/hub/session</p>
<p><i><small><a href="http://jetty.mortbay.org">Powered by
Jetty://</a></small></i></p>

Also, the test_remote target doesn't seem to test the WebDriver bits
(only Selenium), and I see NPEs from the server side (that is,
InProcessTestEnvironment) when I run test_remote_firefox_rb.

I'm looking into it, but could use some help.

Jari

Simon Stewart

unread,
Dec 10, 2009, 2:00:04 PM12/10/09
to webd...@googlegroups.com
You probably need the stuff from the "selenium-core" target too.

Simon

Jari Bakken

unread,
Dec 10, 2009, 2:48:36 PM12/10/09
to webd...@googlegroups.com
On Thu, Dec 10, 2009 at 8:00 PM, Simon Stewart
<simon.m...@gmail.com> wrote:
>
> You probably need the stuff from the "selenium-core" target too.
>

Doesn't seem to help. Instead of hijacking Jim's thread I've waved you
a more detailed description of the problems.

Jim Evans

unread,
Dec 10, 2009, 3:19:03 PM12/10/09
to webdriver
I must not have my build environment set up properly. When I call
"rake selenium-server-standalone", I error out building webdriver-
interactions. Here's the actual error:

vcbuild.exe : error VCBLD0004: Project 'E:\Projects\webdriver\trunk
\common\src\cpp\webdriver-interactions\webdriver-interactions.vcproj'
does not contain a configuration called 'Release|x64'.

Looking at the project using Visual Studio, sure enough there is no
such configuration.

On Dec 10, 2:48 pm, Jari Bakken <jari.bak...@gmail.com> wrote:
> On Thu, Dec 10, 2009 at 8:00 PM, Simon Stewart
>

Jim Evans

unread,
Dec 10, 2009, 3:45:57 PM12/10/09
to webdriver
Never mind the build problem for now. I downloaded the .jar from the
drop site and I'm receiving the 403 errors too.
> > a more detailed description of the problems.- Hide quoted text -

Jim Evans

unread,
Dec 16, 2009, 12:53:34 PM12/16/09
to webdriver
Just to close out my own thread here, I was able to get past my
initial build hurdles, so I'm closer to being able to build the
standalone server. However, I got something working using a Java IDE,
and am able to test using that for now.

--Jim
> > - Show quoted text -- Hide quoted text -

Simon Stewart

unread,
Dec 16, 2009, 6:07:16 PM12/16/09
to webd...@googlegroups.com
Also to close off the thread, I found the underlying cause of the 403s
and fixed it (short story: I was an idiot) If you build the standalone
server from HEAD it should be good now.

Simon
Reply all
Reply to author
Forward
0 new messages