I don't know if this is strictly a programming question but here goes.
I have a test that looks like this:
public function testNewCoupon()
{
$this->open("coupon/new/".$this->bank_code);
$this->open("");
}
When I run the test, I get this error:
1) Backend::testNewCoupon
PHPUnit_Framework_Exception: Response from Selenium RC server for testComplete().
XHR ERROR: URL = http://coupon.dev.galapagos.office/backend_dev.php/ Response_Code = 401 Error_Message = Unauthorized.
In other words, my test has no problem going to http://coupon.dev.galapagos.office/backend_dev.php/coupon/new/some-bank-code but it doesn't like http://coupon.dev.galapagos.office/backend_dev.php/ itself for some reason. Also, http://coupon.dev.galapagos.office/backend_dev.php/login doesn't work.
The weird thing is that I can go to ANY of thes开发者_开发问答e URLs in my browser and each works just fine. It's only when testing that there's a problem.
Any idea why this could be happening?
Nevermind. After viewing the headers for /login, I realize this is a problem with my app, not with Selenium. The pages that don't work do, in fact, give a 401.
精彩评论