我正在使用 Eclipse 和 Selenium RC 使用 TestNG 运行 Selenium。我使用了命令:
selenium.captureEntirePageScreenshot("\\test.png","");
但出现以下错误:
com.thoughtworks.selenium.SeleniumException: ERROR: Command execution failure. Please search the forum at http://clearspace.openqa.org for error details from the log window. The error message is: Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsILocalFile.initWithPath]
有人可以建议为什么会发生此错误吗?我已经尝试过以下方法:
1)用“background=#CCFFDD”替换“”(字符串kwargs参数)
2) 在 Firefox 中以 chrome 模式运行
3)将路径更改为以下值,我仍然收到错误:“\test.jpg”、“c:\test.jpg”、“c:\test.png”、“c:\folder1\test .png", (folder1 存在) "c:\folder1\test.jpg",
4) 尝试使用 - selenium.captureScreenshot("\test.png"); 它工作正常,但不能解决我的目的,我不想使用awt。
有人可以建议可能出了什么问题吗?
谢谢,
穆根