WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

Window handles are empty

Open Karthikeyan021298 opened this issue 1 year ago • 11 comments

Hi, I am launching Teams application through winapp driver, after some time of launching I am trying to get the Application's window handles but window handles are returning as empty, If I do the same immediately after launching Teams, I am able to get the Window handles. Please help me to resolve this issue.

Thank you.

Karthikeyan021298 avatar Aug 13 '23 19:08 Karthikeyan021298

Karthikeyan021298 I suggest recreating Teams session in this case by process name

Shakevg avatar Aug 13 '23 19:08 Shakevg

Are you telling to reinitiate Winapp driver session ?

Karthikeyan021298 avatar Aug 14 '23 05:08 Karthikeyan021298

Teams application has a splash screen, please create another session with the opened window read wiki.

anunay1 avatar Aug 14 '23 13:08 anunay1

@anunay1 and @Shakevg I am trying to use driver.launchApp() if windowHandles is empty, I am getting the following Error with no stack trace,

An unknown error occurred in the remote end while processing the command. (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds Build info: version: 'unknown', revision: 'unknown', time: 'unknown' System info: host: 'DESKTOP-OSAQ11O', ip: '10.89.32.40', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_275' Driver info: io.appium.java_client.windows.WindowsDriver Capabilities {app: C:\Users\admin\AppData\Loca..., javascriptEnabled: true, platform: WINDOWS, platformName: Windows} Session ID: 823A6224-C5FE-4A1E-8C5E-182060EA1EFD

Karthikeyan021298 avatar Aug 17 '23 15:08 Karthikeyan021298

launchApp() holds good for android and ios apps not for windows. Have you read the wiki?

anunay1 avatar Aug 17 '23 15:08 anunay1

I took the below screenshot as reference and it was mentioned as work around for splash screen image

I am running the Teams application in Windows machine @anunay1

Karthikeyan021298 avatar Aug 17 '23 16:08 Karthikeyan021298

Which language binding are you using?

anunay1 avatar Aug 17 '23 16:08 anunay1

I am using JAVA 8

Karthikeyan021298 avatar Aug 17 '23 16:08 Karthikeyan021298

check

anunay1 avatar Aug 17 '23 18:08 anunay1

Do I need to get the window id and set the capability while reinvoking a session caps.setCapability("appTopLevelWindow", MAWinHandleHex); @anunay1

Karthikeyan021298 avatar Aug 18 '23 04:08 Karthikeyan021298

Yes

anunay1 avatar Aug 18 '23 04:08 anunay1