Hey Krishnan,
I got it to work now! Basically, I had the set up you described
correct where you have a hub and a node on the same machine, then run
the java program on a different machine referencing a hub which would
cause the test to run on the machine with the hub and node. My problem
was that my second machine had three ethernet adapters (VMware Network
Adapter VMnet8, VMware Network Adapter VMnet1, and LAN). When I did
not specify the "host" option when I start up the node it would select
a host IP address (not sure if it was DHCP IP) for me which did not
work correctly in the network that I am in (I basically need LAN). so
I added a "-host LAN_IP_ADDRESS" when I launched node and it works!
Thanks for your help, I was able to figure it out because of the JSON
information the when you start up a node or hub, which was brought to
my attention by you mentioning 'hubHost'. I was wondered where you
learned of that option and figured something must be different with
our networks because basically had the exactly same set ups (and that
the local node was working fine). I then eventually noticed all
options in the JSON information when you start up a node/hub when I
was doing some more trail and error.
Thanks again!
-Daniel Barajas
On Jul 29, 6:25 am, Krishnan Mahadevan
> *driver = new RemoteWebDriver(new URL("STATIC_IP_HOST:5555/wd/hub"),
> capability);*
>
> I am assuming that the new URL that you are providing is of the form :
> url = new URL("http://" + hostToRun + ":" + port + "/wd/hub");
>
> For starting the hub and the remoteWebDriver you would be using the
> following I believe
>
> java -jar selenium-server-standalone-2.1.0.jar -role hub -hubhost
> STATIC_IP_ADDRESS -port 4444
> java -jar selenium-server-standalone-2.1.0.jar -role webdriver -hubhttp://STATIC_IP_ADDRESS:4444/grid/register-port 5556
>
> Note:
> The following would still work (I have been using this for a few days now
> and never had problems)
>
> MachineA (Here's where we will run our hub and webdriver node)
> java -jar selenium-server-standalone-2.1.0.jar -role hub (Starts the hub on
> the localhost)
> java -jar selenium-server-standalone-2.1.0.jar -role webdriver -hubhttp://localhost:4444/grid/register-port 5556
>
> Now imagine MachineB is where your development is (This is your local
> machine from where you are writing code)
>
> You would instantiate the RemoteWebDriver as below
>
> WebDriver d = new RemoteWebDriver(new URL("http://" + MachineA_Name +
> ":4444/wd/hub"), DesiredCapabilities.firefox())
>
> Hope that helps
>
> Thanks & Regards
> Krishnan Mahadevan
>
> "All the desirable things in life are either illegal, expensive, fattening
> or in love with someone else!"
>
>
>
>
>
>
>
> On Fri, Jul 29, 2011 at 2:38 AM, dan_null <
i.am.bara...@gmail.com> wrote:
> > Hi,
> > I am having trouble getting a simple setup with Selenium Grid 2.0. I
> > want to set up two machines (The first running the hub and a webdriver
> > node and the second machine running one or two nodes). I have not
> > problem creating a hub (on localhost with unique port) and multiple
> > nodes on the same machine. I am using the standalone server 2.1.0 and
> > only using webdriver API/test cases with Windows XP. The problem I am
> > having is being able to give the hub a host that is NOT localhost (the
> > machine has a static IP, not using DHCP) so that the nodes can
> > successfully register to that hub. It seems to be a networking issue
> > or lacking of understanding on my part.
>
> > I looked through the most recent message in group and only found one
> > post similar to mine:
>
> >
http://groups.google.com/group/selenium-users/browse_thread/thread/8f...
> > ,however<
http://groups.google.com/group/selenium-users/browse_thread/thread/8f...>,
> > it does not help.
>
> > Basically, for running JUnit tests using grid 2.0 on the same machine,
> > I use the following:
>
> > To get the hub going, I run: java -jar selenium-server-
> > standalone-2.1.0.jar -role hub -port 5555
>
> > To get the nodes going, I run: java -jar selenium-server-
> > standalone-2.1.0.jar -role webdriver -port 2222 -hubhttp://localhost:5555