Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

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

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

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!
avatar
madisonli2007
Posts : 5
Join date : 2010-08-03

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

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...
avatar
metman
Amateur
Amateur
Posts : 58
Join date : 2010-04-02

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

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.
avatar
madisonli2007
Posts : 5
Join date : 2010-08-03

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

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

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

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

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

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

Wed Aug 11, 2010 8:07 am
http://support.mozilla.com/en-US/kb/managing+profiles

http://svn.openqa.org/fisheye/browse/~raw,r=2335/selenium-rc/website/src/main/webapp/options.html
Note the -firefoxProfileTemplate argument
avatar
pasabeer
Posts : 2
Join date : 2010-08-10

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

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

XHR ERROR When accessing an URL (request_code = -1 ), test can not continue Empty 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