【发布时间】:2010-11-26 03:30:24
【问题描述】:
我正在使用 Eclipse 和 Selenium RC 运行 Selenium 和 TestNG。我使用了命令:
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。
有人可以提出什么问题吗?
谢谢,
穆根
【问题讨论】:
标签: selenium screenshot selenium-rc