MuraliKola / robotframework-seleniumlibrary

Automatically exported from code.google.com/p/robotframework-seleniumlibrary
Apache License 2.0
1 stars 0 forks source link

The server_host argument does not work #240

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
SeleniumLibrary 2.9 does not connect to a remote Selenium 1 server_host, no 
matter if I enter just a host name and pass the port separately, or if I pass 
the host with port in a single URL like this:

timeout=45 | server_host=http://my.remote.host:4444
timeout=45 | server_host=my.remote.host | server_port=4444

If I open a tunnel to the remote host on port 4444 and remove the server_host 
argument, the SeleniumLibrary connects to the remote host through the tunnel. 
It uses localhost and that seems to work.

It appears as if the server_host were ignored.

Not sure if it makes a difference, but I am running from within RIDE 0.44 on 
Python 2.6.5

Original issue reported on code.google.com by dietrich...@gmail.com on 18 May 2012 at 12:03

GoogleCodeExporter commented 8 years ago
An additional observation:

If I pass server_host=http://my.remote.host:4444 anyway while the tunnel is 
open, the remote server is connected properly.

If I then close the tunnel, the connection fails.

Again, it seems that server_host is ignored.

Same effect happens with version 2.8.

Original comment by dietrich...@gmail.com on 18 May 2012 at 12:07

GoogleCodeExporter commented 8 years ago
I forgot to mention connecting to the remote host without tunnel via telnet as 
in

telnet my.remote.host 4444

gives me a connection and I see an incoming request in the selenium server 
debug log.

Original comment by dietrich...@gmail.com on 21 May 2012 at 7:30

GoogleCodeExporter commented 8 years ago
A simple test in java connects, too:

String serverHost = "my.remote.host";
int serverPort = 4444;
String browserStartCommand = "*firefox";
String browserURL = "http://www.mydomain.com";
String url = "/index.html";

System.out.println(serverHost);
System.out.println(serverPort);
System.out.println(browserStartCommand);
System.out.println(browserURL);
System.out.println(url);

DefaultSelenium selenium = new DefaultSelenium(serverHost, serverPort, 
browserStartCommand, browserURL);
selenium.start();
selenium.open(url);
selenium.waitForPageToLoad("30000");
selenium.isTextPresent("Mydomain");
selenium.close();
selenium.stop();

Original comment by dietrich...@gmail.com on 21 May 2012 at 8:10

GoogleCodeExporter commented 8 years ago
The issue is solved, I had a selenium import statement in the top-level suite, 
but the effective import took place in a resource.

Original comment by dietrich...@gmail.com on 21 May 2012 at 8:30

GoogleCodeExporter commented 8 years ago
Good you were able to solve the problem.

Original comment by pekka.klarck on 21 May 2012 at 10:41