【发布时间】:2016-08-19 19:37:18
【问题描述】:
我正在尝试按照here 上的说明学习如何在 C# 中创建 selenium 测试
设置功能:
[SetUp]
public void SetupTest() {
selenium = selenium = new DefaultSelenium("TestServer", 4444, "*iexplore", BaseUrl);
selenium.Start();
verificationErrors = new StringBuilder();
}
每当我运行测试时,selenium.Start();抛出以下异常:
System.Net.WebException : 远程服务器返回错误:(405) Method Not Allowed。
结果堆栈跟踪:
at System.Net.HttpWebRequest.GetResponse()
at Selenium.HttpCommandProcessor.DoCommand(String command, String[] args)
at Selenium.HttpCommandProcessor.Start()
at Selenium.DefaultSelenium.Start()
at SeleniumTests.IMPORT.SetupTest()
selenium 服务器(版本 3.0.0.beta)在远程服务器上运行,我打开了 4444 端口。
【问题讨论】:
-
您是否可以通过键入您提供给 Selenium 的相同 url 在浏览器中看到该页面?你是用http还是https?