Selenium test fails on build server with “No response from server” error

前端 未结 2 1372
醉话见心
醉话见心 2021-01-03 07:31

I have a simple Selenium test within VS2010 test project as follows.

[TestMethod]  
public void MyTestInIE8()  
{  
    IWebDriver driver = new InternetExplo         


        
相关标签:
2条回答
  • 2021-01-03 08:13

    I had this problem as well and the solution I found was to wait a little while after using the FindElement() method before acting on the element.

    Something like this:

    var element = driver.FindElement(By.Id("Name"))
    Thread.Sleep(200);
    element.SendKeys("John");
    

    Apparently there are some race conditions caused by the driver. Or that's my guess anyway.

    0 讨论(0)
  • 2021-01-03 08:19

    The Internet Explorer driver requires some configuration of IE as documented in the project wiki. You will need to make sure that the browser is configured properly on your build server.

    The Selenium project has been updated recently to throw a more useful error in the case where the IE driver isn't configured properly. Updating to 2.0rc2 will give you this more useful error.

    0 讨论(0)
提交回复
热议问题