Appium #226
Unanswered
DanMcNamee
asked this question in
Q&A
Appium
#226
Replies: 1 comment
-
@jwenclcsv Seems like you made the latest changes to Appium support in MAQS. Any ideas or suggestions? Thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm not able to get Appium tests to work. I have installed through npm Appium 2.0.0 beta 48, and windows 2.2.2 driver. I've created a sample calculator test and when I try to run it, I get the following error:
Message:
Test method UnitTests.Appium.AppiumTests.StandardCalculatorAddTest threw exception:
OpenQA.Selenium.WebDriverException: Your driver may be out of date or unsupported. ---> OpenQA.Selenium.WebDriverException: An unknown exception was encountered sending an HTTP request to the remote WebDriver server for URL http://127.0.0.1:4723/wd/hub/session. The exception message was: No connection could be made because the target machine actively refused it. (127.0.0.1:4723) ---> System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it. (127.0.0.1:4723) ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it.
Stack Trace:
AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
IValueTaskSource.GetResult(Int16 token)
Socket.g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
TaskCompletionSourceWithCancellation
1.WaitWithCancellationAsync(CancellationToken cancellationToken) HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo) HttpCommandExecutor.Execute(Command commandToExecute) --- End of inner exception stack trace --- HttpCommandExecutor.Execute(Command commandToExecute) AppiumCommandExecutor.Execute(Command commandToExecute) WebDriver.Execute(String driverCommandToExecute, Dictionary
2 parameters)AppiumDriver.Execute(String driverCommandToExecute, Dictionary
2 parameters) WebDriver.StartSession(ICapabilities desiredCapabilities) WebDriver.ctor(ICommandExecutor executor, ICapabilities capabilities) AppiumDriver.ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions) AppiumDriver.ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout) WindowsDriver.ctor(Uri remoteAddress, AppiumOptions AppiumOptions, TimeSpan commandTimeout) <>c__DisplayClass4_0.<GetWindowsDriver>b__0() AppiumDriverFactory.CreateDriver(Func
1 createFunction)--- End of inner exception stack trace ---
AppiumDriverFactory.CreateDriver(Func`1 createFunction)
AppiumDriverFactory.GetWindowsDriver(Uri mobileHub, AppiumOptions options, TimeSpan timeout)
AppiumDriverFactory.GetDefaultMobileDriver(PlatformType deviceType)
BaseTestAppium.GetMobileDevice() line 64
BaseAppiumTest.b__6_0()
DriverManager.GetBase()
AppiumDriverManager.GetAppiumDriver()
AppiumTestObject.get_AppiumDriver()
LazyMobileElement.ctor(IAppiumTestObject testObject, By locator, String userFriendlyName)
BaseModelAppium.F1GetElement(By element, String description) line 290
BaseModelAppium.F1GetText(By element) line 310
BaseCalculatorPageModel.GetHeaderValue() line 410
BaseCalculatorPageModel.SetToStandardCalculator() line 502
AppiumTests.StandardCalculatorAddTest() line 25
Standard Output:
An unknown exception was encountered sending an HTTP request to the remote WebDriver server for URL http://127.0.0.1:4723/wd/hub/session. The exception message was: No connection could be made because the target machine actively refused it. (127.0.0.1:4723)
at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Appium.Service.AppiumCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary
2 parameters) at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary
2 parameters)at OpenQA.Selenium.WebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout)
at OpenQA.Selenium.Appium.Windows.WindowsDriver..ctor(Uri remoteAddress, AppiumOptions AppiumOptions, TimeSpan commandTimeout)
at CognizantSoftvision.Maqs.BaseAppiumTest.AppiumDriverFactory.<>c__DisplayClass4_0.b__0()
at CognizantSoftvision.Maqs.BaseAppiumTest.AppiumDriverFactory.CreateDriver(Func
1 createFunction) No connection could be made because the target machine actively refused it. (127.0.0.1:4723) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request) at System.Threading.Tasks.TaskCompletionSourceWithCancellation
1.WaitWithCancellationAsync(CancellationToken cancellationToken)at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
No connection could be made because the target machine actively refused it.
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
Your driver may be out of date or unsupported.
at CognizantSoftvision.Maqs.BaseAppiumTest.AppiumDriverFactory.CreateDriver(Func
1 createFunction) at CognizantSoftvision.Maqs.BaseAppiumTest.AppiumDriverFactory.GetWindowsDriver(Uri mobileHub, AppiumOptions options, TimeSpan timeout) at CognizantSoftvision.Maqs.BaseAppiumTest.AppiumDriverFactory.GetDefaultMobileDriver(PlatformType deviceType) at F1Appium.BaseTestAppium.GetMobileDevice() in C:\Users\DMcnamee\source\repos\F1\F1Appium\BaseTestAppium.cs:line 64 at CognizantSoftvision.Maqs.BaseAppiumTest.BaseAppiumTest.<CreateSpecificTestObject>b__6_0() at CognizantSoftvision.Maqs.BaseTest.DriverManager.GetBase() at CognizantSoftvision.Maqs.BaseAppiumTest.AppiumDriverManager.GetAppiumDriver() at CognizantSoftvision.Maqs.BaseAppiumTest.AppiumTestObject.get_AppiumDriver() at CognizantSoftvision.Maqs.BaseAppiumTest.LazyMobileElement..ctor(IAppiumTestObject testObject, By locator, String userFriendlyName) at F1Appium.BaseModelAppium.F1GetElement(By element, String description) in C:\Users\DMcnamee\source\repos\F1\F1Appium\BaseModelAppium.cs:line 290 at F1Appium.BaseModelAppium.F1GetText(By element) in C:\Users\DMcnamee\source\repos\F1\F1Appium\BaseModelAppium.cs:line 310 at UnitTests.Appium.PageModels.BaseCalculatorPageModel.GetHeaderValue() in C:\Users\DMcnamee\source\repos\F1\UnitTests\Appium\PageModels\BaseCalculatorPageModel.cs:line 410 at UnitTests.Appium.PageModels.BaseCalculatorPageModel.SetToStandardCalculator() in C:\Users\DMcnamee\source\repos\F1\UnitTests\Appium\PageModels\BaseCalculatorPageModel.cs:line 502 at UnitTests.Appium.AppiumTests.StandardCalculatorAddTest() in C:\Users\DMcnamee\source\repos\F1\UnitTests\Appium\AppiumTests.cs:line 25 An unknown exception was encountered sending an HTTP request to the remote WebDriver server for URL http://127.0.0.1:4723/wd/hub/session. The exception message was: No connection could be made because the target machine actively refused it. (127.0.0.1:4723) at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute) at OpenQA.Selenium.Appium.Service.AppiumCommandExecutor.Execute(Command commandToExecute) at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary
2 parameters)at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary
2 parameters) at OpenQA.Selenium.WebDriver.StartSession(ICapabilities desiredCapabilities) at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities) at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions) at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout) at OpenQA.Selenium.Appium.Windows.WindowsDriver..ctor(Uri remoteAddress, AppiumOptions AppiumOptions, TimeSpan commandTimeout) at CognizantSoftvision.Maqs.BaseAppiumTest.AppiumDriverFactory.<>c__DisplayClass4_0.<GetWindowsDriver>b__0() at CognizantSoftvision.Maqs.BaseAppiumTest.AppiumDriverFactory.CreateDriver(Func
1 createFunction)No connection could be made because the target machine actively refused it. (127.0.0.1:4723)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
No connection could be made because the target machine actively refused it.
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
Test failed
Any help would be appreciated!
Beta Was this translation helpful? Give feedback.
All reactions