Answer the question
In order to leave comments, you need to log in
Problem connecting to Appium server running in console via C#. What can be trouble?
The server to the console is working properly. If you enter localhost:port into the browser, then the server responds normally and writes logs to the console. But if you try to hook into it with code, C# throws an error
. At the same time, as I run the desktop version, the same code works fine without failures.
Connection snippet:
DesiredCapabilities cap = new DesiredCapabilities(); // экземпляр класса настроек
cap.SetCapability("deviceName", "device"); // имя девайся (абсолютно любое)
cap.SetCapability("udid", "127.0.0.1:62028");
cap.SetCapability("platformVersion", "5.1.1");// версия платформы (тоже любая)
cap.SetCapability("platformName", "Android");//имя платформы
cap.SetCapability("appPackage", "com.instagram"); // пространство имен используемое приложением
cap.SetCapability("appActivity", "com.instagram"); // активное окно
AndroidDriver<IWebElement> driver = new AndroidDriver<IWebElement>(new Uri("http://0.0.0.0:4543/wd/hub"), cap); // инициализируем экземпляр класса драйвера с настроечками
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question