1
我想學習如何在C#創建Selenium測試,下面就hereSelenium測試:不允許的方法錯誤
設置功能說明:
[SetUp]
public void SetupTest() {
selenium = selenium = new DefaultSelenium("TestServer", 4444, "*iexplore", BaseUrl);
selenium.Start();
verificationErrors = new StringBuilder();
}
每當我跑我的測試,硒。開始();拋出以下異常:
System.Net.WebException:遠程服務器返回錯誤:(405)方法不允許。
結果堆棧跟蹤:
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()
硒服務器(版本3.0.0.beta)在遠程服務器上運行,我已經打開端口4444
您是否能夠通過輸入您提供給Selenium的相同url來在瀏覽器中查看頁面?你是否也使用http或https? – neo