【发布时间】:2011-06-26 14:51:53
【问题描述】:
我正在尝试使用 Selenium Grid 在 Google Chrome 9.0.597.98 beta 中运行测试。我使用 Selenium Grid 附带的默认 *googlechrome 目标从 C# 启动测试。当我尝试打开一个站点时,我遇到了 “无法调用未定义的方法 'indexOf'” 错误。
我发现有人建议解决方案是通过传递一些参数来稍微降低 Chrome 的安全性。 This post 建议使用这样的东西:
DefaultSelenium selenium = new DefaultSelenium(location, port, browser, targetPath);
BrowserConfigurationOptions bco = new BrowserConfigurationOptions();
selenium.start(bco.setCommandLineFlags("--disable-web-security"));
由于某种原因,我在任何地方都看不到BrowserConfigurationOptions。 这是 Selenium dll 附带的东西吗?它是 .NET 版本中不可用但在其他版本中可用的东西吗?我有哪些选项来设置这个“--disable-web-security”选项?有没有更好的方法来做到这一点?
【问题讨论】:
标签: google-chrome selenium selenium-rc selenium-grid