Hello. I just started looking into Appium and managed to set up and Android emulator (SDK) in my VM on Macbook Pro. Now I need to set up iOS environment. The more I think about it, the more confused I become. I have two main questions:
How do I set up Appium with iOS to be used with C#/Visual Studio?
Can I use same setup to develop tests for Android and iOS (obviously tests will run on either different devices or emulators)?
I hope that some of the current API that we wrote for web app testing using C# selenium webdriver can be utilized as well to create a code base that is easier to maintain.
Please assist and be as detailed as possible since I am new to this and might not be able to trace the train of thought if some steps are omitted.
It is possible to develop tests with C# and Appium. There is appium-dotnet-driver. But I think it should be actualized. I think it would be good if it become the similar as java-client. In order to improve this situation I am trying to implement something (a bit per day). It is possible that something will be proposed as a pull request soon.
Оk!
I think there are two ways.
This first way is to launch your tests from Windows (!!!). There should be a real Mac or virtual machine (like I do ) where Appium server is launched. So you should define URL of the Mac remote host in your test and you will start your tests remotely.
The second way is to use Xamarin Studio on Mac instead of Visual Studio. But… actually I don’t know how it works with Appium tests. I have found out it recently too )
You can do it. But some problems should be solved. I have mentioned it above.
Hi @SergeyTichomirov . Thank you very much for your reply. Can you please give me an example of “you should define URL of the Mac remote host in your test and you will start your tests remotely” is done?
I am working on macbook pro and have a windows VM. My Visual Studio is on VM. I can instal and run Appium on Mac for iOS. What do I do from that point (example of a URL would be appreciated as well).
Thank you @SergeyTichomirov. I will take a look at those and will try to set it up this week. If I will have problems I hope you will be willing to answer my questions:) Thanks again.
Ok! If you find some problems it possible that they will have been fixed by the moment you will notify me. I am going to propose something as a pull request on this week.
Hi @SergeyTichomirov. I installed Appium and XCode on my mac and trying to run code from VIsual Studio on VM, but to no success so far. The error that I get, as to be expected, is below. 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). Please assist.
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)