Closed GoogleCodeExporter closed 8 years ago
Does this happen consistently?
Original comment by janne.t....@gmail.com
on 17 Nov 2010 at 1:25
Yes, it is consistent. I had other open commands in my testcase and all of them
stopped working with RF-Sel 2.5.
Here is the script
Start
Open Browser ${same url} # this works
do stuff
go to ${same url} # fails with XHR error
go to ${other url} # also fails with XHR error
Original comment by sajjadma...@gmail.com
on 17 Nov 2010 at 2:52
Are you using Firefox? Which version? We run all the acceptance tests with Fx
3.6 on XP, Win7, and Linux without problems.
Based on the description the problem is caused by us updating Selenium's Python
API (issue 131) and forgetting to incorporate all the custom fixes we had in
the previous version. I probably fixed this in revision e7ac13716. Could you
sajjadmalang do the same fix in your local installation (or checkout the latest
source code) to verify does it fix your problem?
Original comment by pekka.klarck
on 17 Nov 2010 at 8:19
it really is revision 5e7ac13716 :)
Original comment by spielman...@googlemail.com
on 17 Nov 2010 at 9:12
I only modified /src/SeleniumLibrary/__init__.py and ran it but got the error
TypeError: open() got an unexpected keyword argument 'ignoreResponseCode'
I think I have to download all the latest sources. But I cannot do this right
now. I will get back asap.
Thanks.
Original comment by sajjadma...@gmail.com
on 18 Nov 2010 at 11:52
You should change line 341 that originally contains
self._selenium.open(url)
to
self._selenium.open(url, ignoreResponseCode=True)
If that really causes the above TypeError, then the actual problem may be
caused by something else. Could it be that a wrong version of selenium.py
module is imported? Could you add line
print 'Selenium location:', selenium.__file__
into the beginning of the __init__.py after line
from selenium import selenium
and tell what path gets printed?
Original comment by pekka.klarck
on 18 Nov 2010 at 12:28
Sorry for my very slow response but im very new to python but I had problems
getting my changes compiled and into the python installation.
The fix still does not resolved the problem I reported.
I manged to make the changes and get it installed. I opened
C:\Python27\Lib\site-packages\SeleniumLibrary\__init__.py to confirm that the
line with "ignoreResponseCode=True" is there. Then I ran my tests and got the
same XHR error back.
My guess is that the fix is not sending the "true" flag to the open command. I
know this because I can see in the "Command History" box in the browser that
the open command is still being called as "open(http://myurl.com/indexPage.do,
False)"
My setup is Windows XP sp3/Firefox 3.6.10/Python2.7/Jython2.5.1
I again appologise for the very very late reply.
Sorry Regards,
\Sajjad.
Original comment by sajjadma...@gmail.com
on 29 Nov 2010 at 11:54
Have the same with Internet Explorer.
Original comment by doc...@gmail.com
on 29 Nov 2010 at 1:22
Forogot to add: For me it happens for certain sites, but earlier, when using
"Open Browser"
Original comment by doc...@gmail.com
on 29 Nov 2010 at 1:29
I did some digging arround solved the problem.
I did the same fix as mentioned by Pekka in the file browser.py line #24 also.
Now it works.
<< self._selenium.open(url)
becomes
>> self._selenium.open(url, ignoreResponseCode=True)
The resolution is that the patch must be done at two places.
ps: Thanks again for the wonderful tool and the support.
Warm Regards,
\Sajjad.
Original comment by sajjadma...@gmail.com
on 29 Nov 2010 at 2:54
I hadn't noticed that also `Go To` keyword itself uses self._selenium.open.
Good catch Sajjad!
It's really weird this problem only happens in some cases. Needs to be fixed in
the next release anyway.
Original comment by pekka.klarck
on 9 Dec 2010 at 11:11
This issue was updated by revision e6866dc210.
Original comment by janne.t....@gmail.com
on 3 Jan 2011 at 8:53
Original comment by pekka.klarck
on 4 Jan 2011 at 10:49
Go To
keyword causes XHR error with Firefox
Original issue reported on code.google.com by
sajjadma...@gmail.com
on 17 Nov 2010 at 12:06