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

Test Name:  Addition
Test FullName:  AppiumTest2.UnitTest1+BasicScenarios.Addition
Test Source:    C:Usersdocumentsvisual  2015ProjectsAppiumTest2AppiumTest2UnitTest1.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:Usersdocumentsvisual  2015ProjectsAppiumTest2AppiumTest2UnitTest1.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



Source link https://sqa.stackexchange.com/questions/28025/-to-run-tests-for-appium-on--studio---to-

LEAVE A REPLY

Please enter your comment!
Please enter your name here