[selenium-users] [python] newbie: Request Error when running Selenium Python client

28 views
Skip to first unread message

Yi

unread,
Apr 29, 2010, 5:49:20 PM4/29/10
to Selenium Users
Hello,

I have been playing with Selenium in the last couple of days, but I
don't seem to get the Python client to work. I am afraid this is
probably a very newbie question but I don't seem to be able to find
any resource online with google search.

When running the test_google.py (the one comes with Python client) I
got the following error. The Selenium RC server is running with
default settings and I have firefox/chrome/ie installed on the
machine. I recorded my own simple test from Selenium IDE and see the
same error when running with Python client. (but works from IDE)

Ideas?

Thanks!

-Y


C:\Selenium-python-client-driver-1.0.1>test_google.py
E
======================================================================
ERROR: test_google (__main__.TestGoogle)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Selenium-python-client-driver-1.0.1\test_google.py", line
28, in test
_google
sel.open("http://www.google.com/webhp")
File "C:\Selenium-python-client-driver-1.0.1\selenium.py", line 764,
in open
self.do_command("open", [url,])
File "C:\Selenium-python-client-driver-1.0.1\selenium.py", line 215,
in do_com
mand
raise Exception, data
Exception: XHR ERROR: URL = http://www.google.com/webhp Response_Code
= -1 Error
_Message = Request Error

----------------------------------------------------------------------
Ran 1 test in 5.960s

FAILED (errors=1)

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

NICK VERBECK

unread,
May 3, 2010, 5:23:01 PM5/3/10
to seleniu...@googlegroups.com
Simple but possible dumb question. Is the RC server running on the
same machine your trying to run the test on? If not change line 22
where is says localhost to the ip or domain of your RC server. Also
may wish to make sure no Firewall is blocking your requests on the RC
server.
--
Nick Verbeck - NerdyNick
----------------------------------------------------
NerdyNick.com
Coloco.ubuntu-rocks.org

NICK VERBECK

unread,
May 3, 2010, 5:33:25 PM5/3/10
to seleniu...@googlegroups.com
So ignore my 1st response. After looking at some code you would need
to be talking to the RC in the 1st place. My bad.

Its appearing that something may be wrong with the install of RC
and/or firefox. So you may just try to do a simple create a new
selenium sessions and make a simple open request. Something like:

sel = selenium("localhost", 4444, "*firefox", "http://www.google.com/")
sel.start()
sel.open('/')
sel.stop()

and see if that works.

On Thu, Apr 29, 2010 at 3:49 PM, Yi <flyin...@gmail.com> wrote:
--
Nick Verbeck - NerdyNick
----------------------------------------------------
NerdyNick.com
Coloco.ubuntu-rocks.org

Jayakumar C

unread,
May 14, 2010, 10:26:13 AM5/14/10
to seleniu...@googlegroups.com
Are you using browser mode for firefox ? ,if so RC will spawn a browser with clean session,there you cant get the proxy to connect to the internet.
you can try to start your RC with -firefoxProfileTemplate flag .
--
Jayakumar
Reply all
Reply to author
Forward
0 new messages