Share
Go down
madisonli2007
Posts : 5
Join date : 2010-08-03

XHR ERROR When accessing an URL (request_code = -1 ), test can not continue

on Tue Aug 03, 2010 10:50 pm
This is a very simple test that open firefox to access an URL. But I keep getting this XHR Error with request code = -1. (The website is ok when manually accessing it).

11:39:31.886 INFO - Command request: open[/, ] on session 5e949364fce3407395b46062af7aa77a
11:39:31.918 INFO - Got result: XHR ERROR: URL = http://test.myweb.org/ Response_Code = -1 Error_Message = Request Error on session 5e949364fce3407395b46
062af7aa77a

any ideas? thanks!
madisonli2007
Posts : 5
Join date : 2010-08-03

Re: XHR ERROR When accessing an URL (request_code = -1 ), test can not continue

on Wed Aug 04, 2010 1:06 am
After I added try/catch and wait, it turns out the error was caused by certificate error on the page, since it's a https page.
According to selenium documentation, selenium RC should be able to handle it automatically. But apparently it doesn't.

It would be great if somebody can shed some light on this...
metman
Amateur
Amateur
Posts : 58
Join date : 2010-04-02

Re: XHR ERROR When accessing an URL (request_code = -1 ), test can not continue

on Wed Aug 04, 2010 4:03 am
Have you created a custom firefox profile to use as the spawn point for your selenium tests? I've run in to problems in certain environments with certs on https pages, but setting up a firefox profile with the certs saved as OK in it and using that to launch the selenium server took care of the problem.
madisonli2007
Posts : 5
Join date : 2010-08-03

Re: XHR ERROR When accessing an URL (request_code = -1 ), test can not continue

on Fri Aug 06, 2010 4:55 am
yes this works perfectly. thanks!
pasabeer
Posts : 2
Join date : 2010-08-10

Re: XHR ERROR When accessing an URL (request_code = -1 ), test can not continue

on Tue Aug 10, 2010 12:46 pm
Could you please post the complete steps involved in it?

Sabeer
metman
Amateur
Amateur
Posts : 58
Join date : 2010-04-02

Re: XHR ERROR When accessing an URL (request_code = -1 ), test can not continue

on Wed Aug 11, 2010 8:07 am
pasabeer
Posts : 2
Join date : 2010-08-10

Re: XHR ERROR When accessing an URL (request_code = -1 ), test can not continue

on Wed Aug 11, 2010 11:01 am
Thanks for the steps. I was able to create a separate profile for FireFox 3.6.2 and able to use it for selenium RC server. Now my test cases are working. Thanks again

Sabeer
Sponsored content

Re: XHR ERROR When accessing an URL (request_code = -1 ), test can not continue

Back to top
Permissions in this forum:
You cannot reply to topics in this forum