我在我的Mac上安装了Appium和Xcode,并尝试在Windows VM上运行Visual Studio中的代码,但到目前为止还没有成功。 Mac上Appium的常规设置中的服务器地址和端口与AppiumServers.cs类(127.0.0.1:4723)中的相同。请协助。 我得到的错误正如预期的那样。
SetUp : OpenQA.Selenium.WebDriverException : 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:4723
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, 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)
答案 0 :(得分:2)
我想我成功了。问题在于IP地址。 127.0.0.1是本地的。我需要更改我尝试连接到Macbook Pro IP的IP地址。