Insight tool shows error icon, but shows message "No failure was detected" - accessibility-insights

I am using a tool for verifying if app is compliant with windows accessibility feature
Tool web link - https://accessibilityinsights.io/downloads/
Test tool have simple MFC combo box .
Tool says "No Failure was detected",
Insight tool shows a error icon.
Below are steps to get above state.
Launch app
Launch Insight tool
select what to test = element
Mouse hover on combo box
expand the combobox
mouse hover on item
click on brush icon on right
It will enter the state described abovewith no error but with error icon
Isolation:
Issue doesn't repro when "Entire App" is selected.
When "Entire App" is selected, tool does not show any error or any error icon. App pass accessiblity
Question is if this tool is reporting valid error ?
What is the error as tool says " No failure was detected."

What you're seeing here is an artifact of trying to capture a transient state. Combobox content goes away when the combobox closes, and that happens as soon as you start the scan. Accessibility Insights for Windows allows you to trigger a scan using a timer, as documented at https://accessibilityinsights.io/docs/windows/getstarted/automatedchecks/#running-automated-checks-with-a-timer. The "short version" is that you start the timer, then open the combobox while the timer is counting down, and the checks will run when the timer reaches zero. The combobox will still be fully opened at this point, so the tests will apply to the combobox contents.
My personal recommendation is to set the scope to the entire application when using the timer, just because transient controls sometimes have multiple layers and trying to have the scope of just the element can tend to hide children of the layers in question.
Thanks for using Accessibility Insights
--DaveTryon
Accessibility Insights team

Related

WinAppDriver Appium not finding element visible through inspect.exe

I am programming on a WinForms application with a gui built using Visual Basic back in pre 2005. I frequently will have elements that are visible on inspect.exe, but when I am running WinAppDriver and Appium it fails to detect those elements.
This is the error I get.
OpenQA.Selenium.WebDriverException: 'An element could not be located on the page using the given search parameters.'
The error will occur even when my application is the only maximized application. It occurs when I click a button and launch another form. To make sure that it isn't because the elements haven't appeared yet, I have run the command Thread.Sleep(5000) to ensure that the form which is launched has enough time to appear.
This is the line of code attempting to click on the element.
driver.FindElementByAccessibilityId("vlblYVar").Click();
Here is a picture showing inspect.exe clearly finding the element. Any guidance would be greatly appreciated!
Turns out it just takes a significant amount of time for the elements in the window that pops up to be recognizable by winappdriver even if inspect.exe picks it up immediately.
I had to use
var element = desktopWait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.VisibilityOfAllElementsLocatedBy(ByWindowsAutomation.AccessibilityId("vlblYVar")));
desktop.FindElementByAccessibilityId("vlblYVar").Click();
Also I had to use a driver that loads the desktop UI because using my program's driver never found the element which would lead to a timeout.
I have a new issue though. When I have a combo box, the elements in that combo box are found by name with inspect.exe, but winAppDriver can never identify the elements in the combo box.

Halt code at dialog (msgbox()) command in IDE

Title quite much says it all.
In VB6, and in VBA/Access it was possible to hit break key, and jump into debug mode when using the msgbox() command.
Is there a way to do this in vb.net (desktop/winforms) applications?
Often, some code will toss up a dialog box, and it is rather nice then to jump into debug mode as a result of that message box having been displayed.
Edit
Ok, hitting pause button in most applications work, but in this application, when I hit pause, then I get this:
Edit two:
Ok, I have discovered the reason for this behavior. I have the application Frame work box un-checked. The reason for this is I did't want to specify the main application form as startup form, and I desired additional control over what occurs if the main startup form (that I don't specify) is closed. Thus, my main application form is launched via application.Run(my form)
It thus seems that due to starting the main form as a new separate application thread (which is the result of using application.Run(), then you can't use ctrl-break, or more common use/hit the pause button in the IDE to halt the code. Hitting pause will thus display that the application is running a main app thread, which indeed is the case since I use applicaiton.Run() to launch the main form from the classic and traditional Sub Main().
Edit 3
A way to fix this, and enable the pause key to work is to un-check in tools->debugging the [ ] Enable Just My Code. This will thus allow debug mode of the other "main" application thread.
Hmm. [CTRL][BREAK] clears the dialog box. However, clicking the pause button in the IDE will do what you want.
Alternatively, select Debug > Break All from the menu.

Cannot click on specified element on UI-Windows Tree using G1ANT Robot

I'm trying to use UI addon command-click. After looking for an element in windows tree I decided to use that tool to choose a specific button, which opens in the dialog window on my desktop application. Unfortunately, it wasn't working in the main script -> sometimes it clicked, but not on the button itself, it chose the point outside of the dialog box. The tricky part is that line worked, but in different robot file, I placed only one line, exactly the same and it used to work. Today none of the above works...
The error it's giving me sounds like this: "Access denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)" do somebody knows how to make it work properly?
I tried switching on/off addons, focusing on different windows, different delays, changing scaling from windows side, etc.
The line I'm using: ui.click wpath "path to element from UI tree"
Also, res. of the screen is 1920x1080p
I can use image recognition on that part of my script, but if it's in the UI windows tree it should work correctly right?
The path could change, check whether you use any properties that could be dynamic (like #id). Consider using keyboard command if the button is focusable or has assigned a keyboard shortcut.

XamlSpy prevent me from doing actions

I installed XamlSpy using NuGet in my UWP app.
I debug my application and connect it successfully using the XamlSpy.
The problem is that every mouse hover is responses by XamlSpy what prevents me from clicking on buttons etc'...
How can I start inspect only when needed ?
I tried CTRL+Shift without success...
How can I start inspect only when needed
According to this article, Ctrl+Shift is worked for XAML Spy 2. By testing on my side, I guess you are using XAML Spy 3.
In that case, when you are using the XAML Spy desktop app to inspect, the "Select Visual" button which is for moving your mouse to the app, and click to select a visual in the user interface, is highlighted by default. You may need to click it to not highlight the button to stop inspecting, and click again can start inspecting again when you needed.

Adding assertions Coded UI tests

I am working on testing a add on on MS Word using Coded UI tests in Visual Studio. I am at a point where I need to verify that after signing in, the user sees a new pop up window. I am not sure how to verify this. I try dragging the cross hair icon over on the pop up window, but am not sure which assertion to add.
If you drag the assertion tool over the entire Window, you can do an assertion over one or all of the following:
Control Type - this will ensure that your 'webpage dialog' is a 'window'
Exists - this will check that your 'webpage dialog' exists and has indeed poped up. This is good for creating a negative test too (e.g. testing a scenario where the window should not popup if the user does not sign in correctly)
Title - if you know what the title of your popup is, you can test that too