开发者

selenium.open("/"); generated an XHR 500: Internal Server Error [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_StackOverflow社区 Closed 10 years ago.

Any clues on what causes this?


This is a known issue in Selenium RC 1.0.3. Details can be found here: http://code.google.com/p/selenium/issues/detail?id=408

The workaround for 1.0.3 is to overload the open command with one that passes a boolean as a second argument set to true.

Alternatively, you could wait for a new version to be released, however most development efforts are focused on Selenium 2. This is currently in alpha, and the latest version (2.0a4) does not have this issue.


This one worked for me in Java. If a URL(say testurl) brings up the XHR Response code 500 Internal server error, then dont use the selenium.open command to open the url. instead, try with selenium.openWindow. Something like this:

selenium.open("http://google.com"); //or any site that will open without an error
selenium.openWindow(testurl,"18");
selenium.selectWindow("18");
selenium.selectWindow("Google");  //or the window title of the site from step 1 above
selenium.close();
selenium.selectWindow("18");


Thanks. Got the solution..For any other people who chance upon this problem, here is the solution:

Replace setUp(...) with

Integer port = 4444;
String browserString= "*firefox";
String url = "http://yoururl.com";
selenium = new DefaultSelenium("localhost",port,browserString,url) {
public void open(String url) { commandProcessor.doCommand("open", new String[] {url,"true"});};
selenium.start();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜