2

I am trying to run my script on Appium and I always fail tests because of an error on my unit test:

Test Name:  Addition
Test FullName:  AppiumTest2.UnitTest1+BasicScenarios.Addition
Test Source:    C:\Users\documents\visual studio 2015\Projects\AppiumTest2\AppiumTest2\UnitTest1.cs : line 72
Test Outcome:   Failed
Test Duration:  0:00:00

Result StackTrace:  
at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
   at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
   at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
   at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
   at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(Uri remoteAddress, ICapabilities desiredCapabilities)
   at AppiumTest2.UnitTest1.BasicScenarios.Setup(TestContext context) in C:\Users\documents\visual studio 2015\Projects\AppiumTest2\AppiumTest2\UnitTest1.cs:line 33
Result Message: Class Initialization method AppiumTest2.UnitTest1+BasicScenarios.Setup threw exception. OpenQA.Selenium.WebDriverException: OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server for URL http://127.0.0.1:4723/wd/hub/session timed out after 60 seconds. ---> System.Net.WebException: The operation has timed out.

This is what I have now on my code:

DesiredCapabilities appCapabilities = new DesiredCapabilities();
appCapabilities.SetCapability("platformName", "Android");
appCapabilities.SetCapability("deviceName", "emulator-5554");
appCapabilities.SetCapability("appActivity", "com.android.calculator2.Calculator");
appCapabilities.SetCapability("appPackage", "com.android.calculator2");
appCapabilities.SetCapability("newCommandTimeout", "6000000");

CalculatorSession = new RemoteWebDriver(new Uri(WindowsApplicationDriverUrl), appCapabilities);
Assert.IsNotNull(CalculatorSession);

CalculatorSession.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(600000));

I wonder what is wrong with my settings and I can't seem to find the issue. I have increased the timeouts but it won't fix it. This is my first time using appium

1

I downloaded HAXM installer from intel and used the Google APIs Intel Atom (x86). This seemed to resolve my issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.