using ip address how to run code in webdriver

2,175 views
Skip to first unread message

tarun mehrotra

unread,
Jun 5, 2013, 12:45:47 PM6/5/13
to seleniu...@googlegroups.com
Hi  All,
I want to automate my website which currently on local server but when i give my local server number with port number .,my webdriver code doesn't run.Is there any solution for this??

Thanks
Tarun Mehrotra

Jon Valvano

unread,
Jun 5, 2013, 1:07:47 PM6/5/13
to seleniu...@googlegroups.com
Hello Tarun,

What is the exact error?
What does the code look like?

It might be that you are confusing the webDriver port and url with the port and url for the application you are testing.

Thanks.




Tarun Mehrotra

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/8ed8a1ff-1d24-4b77-abd7-0113650bda2f%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

tarunme...@gmail.com

unread,
Jun 5, 2013, 1:10:16 PM6/5/13
to seleniu...@googlegroups.com
Hi jon I am using like ip address 193.168.0.25;9093. And error is like first code does not run and after that some port appears.
Sent from BlackBerry® on Airtel

From: Jon Valvano <jon.v...@gmail.com>
Date: Wed, 5 Jun 2013 13:07:47 -0400
Subject: Re: [selenium-users] using ip address how to run code in webdriver
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/bLp3RgWDvoA/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.

Jon Valvano

unread,
Jun 5, 2013, 1:20:19 PM6/5/13
to seleniu...@googlegroups.com
Sorry,  this is still not enough information to go on.

Are you using the Selenium IDE or the WebDriver interface through some other programming language?  




tarunme...@gmail.com

unread,
Jun 5, 2013, 1:22:03 PM6/5/13
to seleniu...@googlegroups.com
Selenium web driver in java.
Sent from BlackBerry® on Airtel

From: Jon Valvano <jon.v...@gmail.com>
Date: Wed, 5 Jun 2013 13:20:19 -0400

Jon Valvano

unread,
Jun 5, 2013, 1:34:27 PM6/5/13
to seleniu...@googlegroups.com
How are you navigating to the test url?

You should be getting your WebDriver instance and calling the get() method.
Here is the example from the documentation:

        // Create a new instance of the Firefox driver
        // Notice that the remainder of the code relies on the interface, 
        // not the implementation.
        WebDriver driver = new FirefoxDriver();

        // And now use this to visit Google
        driver.get("http://www.google.com");

Note the get command takes any valid url so it can have your ip and port.


tarunme...@gmail.com

unread,
Jun 5, 2013, 1:41:07 PM6/5/13
to seleniu...@googlegroups.com
Ya I am doing like this only but instead of www.google.com or some other website. I want to use ip address like 193.168.0.25.so in that case it Is not working
Sent from BlackBerry® on Airtel

From: Jon Valvano <jon.v...@gmail.com>
Date: Wed, 5 Jun 2013 13:34:27 -0400

Jon Valvano

unread,
Jun 5, 2013, 1:48:43 PM6/5/13
to seleniu...@googlegroups.com
Good that was not clear at all from the original posts.  :-)   It is possible to tell WebDriver to listen to on a non default port and we needed prove that you were not setting the URL/port in the wrong API call.

Can you navigate to that ip directly on the browser?  
Can you ping the ip address?
Do you have a firewall up?
- If your firewall is up is it blocking the port you are trying to connect to?
- Is the firewall blocking any of the ports that Selenium is trying to use?  (you mentioned that a bunch of ports show up.)

Having the specific error message would make this easier.  :-)

Good luck!




Tarun Kumar

unread,
Jun 5, 2013, 11:07:29 PM6/5/13
to seleniu...@googlegroups.com, tarunme...@gmail.com
did you append "http://" before IP address when invoking it through Selenium?

Tarun Kumar

unread,
Jun 5, 2013, 11:47:31 PM6/5/13
to seleniu...@googlegroups.com
@tarun, You sent a direct mail to me and not on group!
I hope you realize that you need to append "http://" to your IP address....


On Wednesday, June 5, 2013 11:11:07 PM UTC+5:30, tarun mehrotra wrote:

Srisowrabha Kumar

unread,
Jun 6, 2013, 3:59:01 AM6/6/13
to seleniu...@googlegroups.com, tarunme...@gmail.com
Hi Tarun,

I feel, there is a typo error. Are u typing http://193.168.0.25;9093(this is the one u r saying in the post) or http://193.168.0.25:9093. I see semi-colon in place of colon.

Thanks,

Sowrabha

Tarun Kumar

unread,
Jun 6, 2013, 5:35:11 AM6/6/13
to seleniu...@googlegroups.com, tarunme...@gmail.com
well, follow the standard format of URL

tarun mehrotra

unread,
Jun 6, 2013, 9:54:53 AM6/6/13
to Tarun Kumar, seleniu...@googlegroups.com
Hi All,
when i am running my code using (http://193.168.0.25:9093)
I am getting following error:

Exception in thread "main" org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within 45000 ms
Build info: version: '2.20.0', revision: '16008', time: '2012-02-27 19:03:59'
System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_17'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.internal.SocketLock.lock(SocketLock.java:95)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:69)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:187)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:93)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:142)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:84)
at firspage.main(firspage.java:10)

--
Thanks&Regards
TarunMehrotra
8952005566

Hari

unread,
Jun 6, 2013, 10:00:26 AM6/6/13
to seleniu...@googlegroups.com

tarun mehrotra

unread,
Jun 7, 2013, 1:14:35 AM6/7/13
to seleniu...@googlegroups.com
HI ,
I gone through the above link as per the comments in that group  i tried the 
'netstat -b' on cmd but no result 
 and i tried some other command also  like-  'netstat -n | grep 7054' 
but i didnt get any result as per the group discussion it is telling that there is some service running on this location..


Thanks 
Tarun Mehrotra



For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Thanks&Regards
TarunMehrotra
8952005566

Krishnan Mahadevan

unread,
Jun 7, 2013, 1:43:28 AM6/7/13
to Selenium Users
Please try using the latest version of Selenium viz., 2.33.0

You seem to be running on a very old version of Selenium [Build info: version: '2.20.0', revision: '16008', time: '2012-02-27 19:03:59']

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


Reply all
Reply to author
Forward
0 new messages