0

我正在使用几周前在 Firefox 中创建的脚本。当我加载它时,Firefox 会打开,但会出现空白并且无法运行。

selenium = new DefaultSelenium("localhost", 
            4444, 
            "*firefox C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe", 
            "http://www.test.com/");
selenium.Start();

Firefox 配置文件会妨碍您吗?它每次都会打开一个新的 Firefox 实例,但不会访问测试站点。

4

1 回答 1

1

"http://www.test.com/"通过为您的 selenium 实例编写 代码,您只需为您的测试提供基本 url。要导航到您的测试站点,您应该使用selenium.open("/")命令。要导航到"http://www.test.com/test.html"您应该使用selenium.open("/test.html")等等。

于 2012-04-30T22:48:35.680 回答