简体   繁体   English

使用C#/ Visual Studio的Appium iOS自动化

[英]Appium iOS automation using C#/Visual Studio

I installed Appium and Xcode on my mac and trying to run code from Visual Studio on Windows VM, but to no success so far. 我在Mac上安装了Appium和Xcode,并尝试在Windows VM上从Visual Studio运行代码,但到目前为止没有成功。 Server's address and port in General Settings of the Appium on Mac are the same as in AppiumServers.cs class (127.0.0.1:4723). Mac上“ Appium的常规设置”中的服务器地址和端口与AppiumServers.cs类(127.0.0.1:4723)中的相同。 Please assist. 请协助。 The error that I get, as to be expected, is below. 可以预期,我得到的错误如下。

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)

I think I managed. 我想我成功了。 The problem was with the IP address. 问题出在IP地址上。 127.0.0.1 is local. 127.0.0.1是本地的。 I needed to change the IP address I was trying to connect to the IP of the Macbook Pro. 我需要更改尝试连接到Macbook Pro IP的IP地址。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM