Katalon Studio 7.0 RC1 Win Application connection refused

Hello.

i am trying to do some simple notepad Windows application test record, but will faced connection refused

WinAppDriver Url http://xxx.xxx.x.xx:4723
Application file C:\Windows\System32\notepad.exe

java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: Connection refused: connect
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘LAPTOP-AK5DO7TK’, ip: ‘xxx.xxx.x.xx’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
Driver info: driver.version: WindowsDriver
at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.runAndWait(ProgressMonitorDialogWithThread.java:49)
at com.kms.katalon.composer.windows.dialog.WindowsAppComposite$5.run(WindowsAppComposite.java:185)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: org.openqa.selenium.WebDriverException: Connection refused: connect
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘LAPTOP-AK5DO7TK’, ip: ‘xxx.xxx.x.xx’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
Driver info: driver.version: WindowsDriver
at io.appium.java_client.remote.AppiumCommandExecutor.lambda$5(AppiumCommandExecutor.java:251)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:250)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.windows.WindowsDriver.execute(WindowsDriver.java:1)

3 Likes

hi,

service is not running
C:\Program Files (x86)\Windows Application Driver>sc query “WinAppDriver” | findstr STATE

C:\Program Files (x86)\Windows Application Driver>

how to start this service?

hi,

C:\Program Files (x86)\Windows Application Driver>WinAppDriver.exe
Developer mode is not enabled. Enable it through Settings and restart Windows Application Driver
Failed to initialize: 0x80004005

hi,

could it be that F-Secure will prevent to use this driver
I have changed my win to developer model, no success

1 Like

Please enable developer mode then start Windows App Driver.


Thanks

hello,

got it this service to run
need to run as admin
C:\Program Files (x86)\Windows Application Driver>WinAppDriver.exe
Windows Application Driver listening for requests at: http://127.0.0.1:4723/
Press ENTER to exit.
and now Record WinApp will work

2 Likes

Thanks Timo!

Dear Katalon developers, is this the way this is always supposed to work?

Will testers always have to manually start the WinAppDriver every time they need it? That seems like something that could be …automated, as part of the installation?

Thank-you!

Hi @Kevin.Burr,

Start WinAppDriver.exe is a part of setup process, you don’t need to start WinAppDriver.exe again for the next time.

Thanks

Thanks @duyluong,

It doesn’t start up automatically (even after a reboot), but its good to know it is supposed to, once it is setup correctly.

I will go through installing WinAppDriver again and see. It may turn out to have something to do with our secure environment…

Best regards

Hi @Kevin.Burr,

After the reboot, the WinAppDriver.exe process will be gone, you need to start it again.

Btw, we will consider to add an option to check and start WinAppDriver.exe automatically.

Thanks for your question

Thank-you!

Hi everybody!.. i got this issue too, Katalon keyword says “start Driver and Application” in function “Start Application”, exactly says: “Starts Windows driver and starts the Windows application at the given absolute path.” and its wrong, only start Windows application,
i suggest for the new version integrate a hidden start of WinnAppDriver.exe

i fix it with a keyword when i integrate winium with katalon, i share with you a possible fix:

@Keyword
def OpenWiniumDriver(){
CloseWiniumDriver()
System.out.println(“Opening Winium Driver”)
Runtime.getRuntime().exec(“cmd /K C:\Automation_Drivers\Winium.Desktop.Driver.exe Start”)
Thread.sleep(3000);
}

and the method to kill it:

@Keyword
def CloseWiniumDriver(){
System.out.println(“Closing Winium Driver”)
Runtime.getRuntime().exec(“taskkill /F /IM Winium.Desktop.Driver.exe”)
Thread.sleep(2000)
}

Obviously, the path of the WinAppDriver must be:

C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe

and the task to kill must be:

WinAppDriver.exe

i didnt try it jet, put i will soon.

I have enabled Developer Mode and also opened the command prompt in Admin Mode still I see the same message
c:\Program Files (x86)\Windows Application Driver>WinAppDriver.exe
Windows Application Driver listening for requests at: http://127.0.0.1:4723/

Address ‘http://127.0.0.1:4723/’ is already in use

Failed to initialize: 0x80004005

image

Hi all,

I have the same issue as the others: it doesn’t work at my side. I’ve followed the tutorial on the docs and what @Timo_Kuisma said, but I’m still getting “connection refused”.
Listener is on, started AppDriver as admin, then installed again in Katalon UI itself, restarted Katalon, but no luck. Any idea’s?
Oh yes, I’ve put my laptop on Developer Settings on dev.

Thanks in advance,
diesel

i do all setup above @duyluong

  • install WinAppDriver
    -turn on Developer Mode
  • Access WinAppDriver in cmd by Admin
    but i still got their error
    window 11 - Version 8.2.5
    info error :
    java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: Connection refused: connect
    Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
    System info: host: ‘LAPTOP-TJ0HP9ND’, ip: ‘192.168.1.14’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_282’
    Driver info: driver.version: WindowsDriver
    at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.runAndWait(ProgressMonitorDialogWithThread.java:49)
    at com.kms.katalon.composer.windows.dialog.WindowsAppComposite$5.run(WindowsAppComposite.java:243)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
    Caused by: org.openqa.selenium.WebDriverException: Connection refused: connect
    Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
    System info: host: ‘LAPTOP-TJ0HP9ND’, ip: ‘192.168.1.14’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_282’
    Driver info: driver.version: WindowsDriver
    at io.appium.java_client.remote.AppiumCommandExecutor.lambda$5(AppiumCommandExecutor.java:251)
    at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:250)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
    at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
    at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
    at io.appium.java_client.windows.WindowsDriver.execute(WindowsDriver.java:1)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
    at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
    at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38)
    at io.appium.java_client.AppiumDriver.(AppiumDriver.java:84)
    at io.appium.java_client.windows.WindowsDriver.(WindowsDriver.java:38)
    at com.kms.katalon.core.windows.driver.WindowsDriverFactory.newWindowsDriver(WindowsDriverFactory.java:194)
    at com.kms.katalon.core.windows.driver.WindowsDriverFactory.startApplication(WindowsDriverFactory.java:112)
    at com.kms.katalon.composer.windows.spy.WindowsInspectorController.startApplication(WindowsInspectorController.java:150)
    at com.kms.katalon.composer.windows.dialog.WindowsAppComposite$5$1.call(WindowsAppComposite.java:246)
    at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.startThreadAndWait(ProgressMonitorDialogWithThread.java:36)
    at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.runAndWait(ProgressMonitorDialogWithThread.java:48)
    … 2 more
    Caused by: java.net.ConnectException: Connection refused: connect
    at okhttp3.internal.platform.Platform.connectSocket(Platform.java:129)
    at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:245)
    at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:165)
    at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:257)
    at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135)
    at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114)
    at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
    at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
    at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
    at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
    at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
    at okhttp3.RealCall.execute(RealCall.java:77)
    at org.openqa.selenium.remote.internal.OkHttpClient.execute(OkHttpClient.java:103)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:105)
    at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)
    at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217)
    at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
    … 17 more

@asinzen

Please share some screenshots of the cmd that starts WinAppDriver when you start the recording session

@duyluong

@asinzen
You should start WinAppDriver and don’t exit the process.


I got the similiar issue - what is the solution?

@yga ,

Your appWorkingDir desired cap should be a folder, not point to the .exe file