question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WinAppDriver Only Finding Title Bar in Window

See original GitHub issue

Seeing a problem where WinAppDriver only sees the title bar on a private app. All elements (buttons, input boxes) are selectable using inspect.exe.

wdio conf file capabilities

"ms:experimental-webdriver": true,
"ms:waitForAppLaunch": 3

The window source logged

 <?xml version="1.0" encoding="utf-16"?><Window AcceleratorKey="" AutomationId="" ClassName="ThunderRT6FormDC" FrameworkId="Win32" HasKeyboardFocus="False" IsContentElement="True" IsControlElement="True" IsEnabled="True" IsKeyboardFocusable="True" IsOffscreen="False" IsPassword="False" IsRequiredForForm="False" ItemStatus="" ItemType="" LocalizedControlType="window" Name="REDACTED" Orientation="None" ProcessId="19400" RuntimeId="42.396646" x="0" y="0" width="419" height="401" CanMaximize="False" CanMinimize="False" IsModal="False" WindowVisualState="Normal" WindowInteractionState="ReadyForUserInteraction" IsTopmost="False" CanRotate="False" CanResize="False" CanMove="True" IsAvailable="True">

<TitleBar AcceleratorKey="" AutomationId="" ClassName="" FrameworkId="" HasKeyboardFocus="False" IsContentElement="False" IsControlElement="True" IsEnabled="True" IsKeyboardFocusable="True" IsOffscreen="False" IsPassword="False" IsRequiredForForm="False" ItemStatus="" ItemType="" LocalizedControlType="title bar" Orientation="None" ProcessId="19400" RuntimeId="42.396646.3.-2147483647.396646.-2.0" x="1" y="8" width="417" height="23" />

// more elements should be here

</Window>

Any ideas?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:10

github_iconTop GitHub Comments

1reaction
StMargaritcommented, Nov 25, 2022

Hello, I figured it out. My app is WPF application. I use Appium server the same way as described here https://github.com/microsoft/WinAppDriver/issues/1692#issuecomment-1066565875, because I had the same problem as in the thread and I could not downgrade Selenium. I saw only title bar in Appium inspector, but what helped was running Appium inspector as administrator. Then I could see all the elements in my app. And similarly, running Appium server as admin, then my test works again (only Actions do not work, for example right click, but I think that is already known issue https://github.com/appium/appium/issues/16268).

0reactions
StMargaritcommented, Nov 25, 2022

Well it was weird but inspect.exe showed the elements somehow. But only when focus was on them. When I tried to click in the tree of elements, the element was there but its properties were unavailable (aside from title bar). So that was confusing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WinAppDriver - Get Window Handles Titles
I need to create an algorithm that switches from one windows to another using WinAppDriver like this windowsDriver.SwitchTo().
Read more >
UI testing for Windows apps with WinAppDriver and Appium
This is why we often adopt unit testing, which takes our logic and split it into small pieces, which are tested separately and...
Read more >
Switch to window title takes long - desktop app
When running switch To Window Title, it takes more than 30 seconds to finish execute. How do I find an application window faster....
Read more >
Title bar customization - Windows apps
Windows provides a default title bar for every window and lets you to customize it to match the personality of your app. The...
Read more >
How To Automate Desktops Apps Using WinAppDriver
For my demo, I would be using Inspect.exe for locating elements in the Windows Application. Demonstration: Desktop Application Testing using ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found