Hi All,
So I’ve been using eclipse and java this whole and have been trying to switch to C# as I’m more familiar with it. I’ve been looking at sample scripts to try to get it working but no luck. I’ve resolved all the dependency issues except for using Appium.Samples.Helper; . Can someone please show me the how to connect to the server via the IDE? I’ve included what I have below, I’m hoping I’m somewhat correct.
I’ve been getting this error message:
OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError (errorResponse={( UnhandledError: System.Net.WebException: Error: ConnectFailure (Connection refused) —> System.Net.Sockets.SocketException: Connection refused
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x000f1] in /private/tmp/source-mono-mac-4.0.0-branch/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.0/mcs/class/System/System.Net.Sockets/Socket_2_1.cs:1251
at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) [0x0019b] in /private/tmp/source-mono-mac-4.0.0-branch/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.0/mcs/class/System/System.Net/WebConnection.cs:213
— End of inner exception stack trace —
at System.Net.HttpWebRequest.EndGetRequestStream (IAsyncResult asyncResult) [0x00043] in /private/tmp/source-mono-mac-4.0.0-branch/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.0/mcs/class/System/System.Net/HttpWebRequest.cs:818
at System.Net.HttpWebRequest.GetRequestStream () [0x00057] in /private/tmp/source-mono-mac-4.0.0-branch/bockbuild-mono-4.0.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.0.0/mcs/class/System/System.Net/HttpWebRequest.cs:836
at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute (OpenQA.Selenium.Remote.Command commandToExecute) [0x000a1] in :0
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute (System.String driverCommandToExecute, System.Collections.Generic.Dictionary`2 parameters) [0x00014] in :0 )}) in
namespace Appium.Samples
{
[TestFixture ()]
public class IosSimpleTest
{
public static Uri localURI = new Uri("http://127.0.0.1:4723/wd/hub");
static void Main(){
//IOSDriver driver;
RemoteWebDriver driver;
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.SetCapability("platformName", "ios");
capabilities.SetCapability("UDID", "b6140d3ae8678e2b6da2a7834f28ba7dbf30aece");
driver = new RemoteWebDriver (new Uri ("http://127.0.0.1:4723/wd/hub"), capabilities );
}