在W2k8 64位我在Android 4.1 API Level 16的ARM仿真器實例中使用ARM作爲CPU。 推出它後我跑我的單元測試,並在第一行無法初始化AndroidDriver
var webDriver = new AndroidDriver("http://localhost:8080/wd/hub"); //also with no argument
我有一個例外:
Unexpected error. System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8080
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
webdriver的這個版本是2.25.1.0。
我跟着這篇文章:
http://www.nishantverma.com/2011/06/installing-webdriver-on-android.html
當我使用其他司機一樣Firefox-或ChromeDriver工作正常。
我會gratefull任何意見
感謝您的回覆。我現在根據http://www.nishantverma.com/2011/06/installing-webdriver-on-android.html的指示完成了這個工作,但我無法連接(404)到http:// localhost:8080/WD /集線器。也沒有溝通「碼頭開始」。當然,代碼中的錯誤仍然是一樣的。 – user278618