Text is visible in UI of WPF application but WinAppdriver is unable to identify the text - wpf

I am trying to automate a windows Application (WPF) using WinAppdriver v1.2.1 and Java. However I am facing an issue now in identifying the Text which is visible in the UI but winappdriver is not able to locate it. (I made sure that the xpath is correct). I even tried the xpath generated by UIRecorder
In screenshot below, the highlighted text is what I want to locate:
Astonishingly, the Inspect.exe tool is able to show the text and the control type is UIA_TextControl and all other attributes are available, as displayed in screenshot below:
Since the driver was not able to identify Text, to verify this strange behaviour, I used another UI inspect tool. When trying to locate the text using FlaUInspect, the Text Control is not visible under TreeItem.
I am wondering:
Why these Windows UI inspect tools have different behaviour and Why winappdriver is not able to identify the TextControl when it is clearly visible in UI and in inspect.exe tool?
Has anyone faced similar issue ever?

Related

How to use snoop WPF for UI Automation

I am trying to automate an app using AutomationElement or TestWhite/FlaUI, the problem is snoopWPF seems the only one that is able to see the elements inside the window due to its injection feature (spy++ or inspect.exe do not see the visualtree).
Is it possible to use snoop code to automate a button click on a windows? any examples? thanks

tinymce wysiwyg editor - text cursor issue, text fields/areas become inactive

I'm working on a couple of features for a project that I created a few months back when I was first learning React. I wanted to add a wysiwyg editor to one of my forms so that a user could have more control with the "about" section of an event page (i.e. embed media and images, html source code editing, font formatting, etc.)
The editor that I'm using is TinyMCE 5.0.
This project is a Rails backend and React frontend. (I'm not using Redux - this project was a way to practice React when I first learning it.)
You can find my last commit here if you would like to see my code
The Problem
I'm able to get the wysiwyg editor rendered. I can also type and format text inside the editor's body. When I click on the code icon or image embed icon (like in the gif below), a new modal appears but when I click into it to type, the text cursor appears and then disappears. So I can't type and it seems that the text area and fields become inactive (for lack of a better term - I'm still somewhat in the beginning of my coding journey.)
I just signed up and TinyMCE gives access to premium plugins as well, so I don't think it's an issue with my account permissions/subscription.
I'm also not receiving anything in the console but if there's any help you can provide, it would be appreciated!
Thanks!
TinyMCE 5 editor - text cursor issue - text areas become inactice
It is highly likely that the library you are using for your modal (that contains TinyMCE) is not allowing focus to go elsewhere. As you have not stated the library you use for your modal I can't tell you anything about how to address this but we know this is an issue with common libraries like Bootstrap:
https://www.tiny.cloud/docs/integrations/bootstrap/#usingtinymceinabootstrapdialog
Whatever you are using should have a similar ability.

Behaviours in wpf apps Microsoft expression blend 4

I am using Microsoft expression blend 4 and i want to add a simple button,in a wpf application, which by clicking it(on "Run Project" mode) navigates the user to another existing wpf application in expression blend 4.This can be done by using a method but maybe I used the wrong method or i used the right method the wrong way.To be more specific i dragged on the button(that i want to make the task i mentioned) the "Launch UriOrFile Action" method but i realised(by making experiments with various files on desktop and using internet url's) that i can only link the running wpf application with random files or internet sites and not to another wpf application as i wanted(when i put the path of the wpf application it pops up a window saying"windows explorer has stopped working",something that didnt occured when i put random file's paths or internet sites url's).If anyone understands my problem let me know!thanks!!
Check out Process.Start. Create a command that fires code that calls that method.

Codeplex sample browser - what UI technology is it?

Codeplex has a strange application for downloading and browsing Windows samples, and I have not been able to understand just what it is:
http://1code.codeplex.com/releases/view/64539
When the click-once application above is installed, it creates a single file in the form of a shortcut which contains the following line only:
http://1code.codeplex.com/releases/clickonce/SampleBrowser.application#SampleBrowser.application, Culture=neutral, PublicKeyToken=48e4844f2d49d017, processorArchitecture=msil
Then, when this shortcut is double-clicked, a sort of browser application comes up, but it has no window borders and is very modern looking. What type of technology is this? I am including the WPF tag otherwise I am at my wit's end as to what it is.
(Wanted to include an image of the said application here but can't seem to upload an image as I am getting the following error: "Failed to upload image; imgur is rejecting the request") Here's a link to that image: http://imgur.com/B38P6
Thanks.
The initial part about the odd link is simply a click-once application. The rest of the application is hidden away somewhere in your user directory.
The "browser" is simply a window which has had its chrome modified. Could be pretty much any technology. A couple examples in winForms and wpf.
As a caution, if doing a custom chrome in wpf don't use the AllowTransparency="True" if you want your comboboxes and such to work properly on XP.

Using WPFPerf to profile a WPF 4.0 application doesn't show me any information

I am trying to use WPFPerf to profile a WPF 4.0 application (I have the latest WPFPerf that should work on WPF 4.0 aps). I start the tool Visual Profiler from WPFPerf, I start my aplication, but after that nothing happens and the element tree from the Visual Profiler is empty. No other error message is shown. Can anyone tell me what am I not doint right?
As an additional information, when I try to analize my .exe assembly or any other assembly from my application, I get a BadFormatException saying that the assembly was build with a newer version of .NET. From the download page http://go.microsoft.com/fwlink/?LinkID=191420
I see that this version of WPFPerf should be ok for my app
TimeZone patch to WPF Performance Profiling Tools for WPF 4 is now available
http://blogs.msdn.com/b/jgoldb/archive/2010/08/24/timezone-patch-to-wpf-performance-profiling-tools-for-wpf-4-is-now-available.aspx
First check to see if its working even with a small blank WPF application. If it is not working with a blank WPF app, then it likely is the patch already mentioned: TimeZone patch to WPF Performance Profiling Tools for WPF 4 is now available
However, in my case that wasn't the issue. Visual Profiler has a bug that causes it not to display the Element tree if it doesn't like some of the characters in its main window title bar.
Through hours of trial and error, I was able to trace the root cause of why it would not work on our application even though it would on a blank WPF application. The reason is that our application has a special character in the title bar text (trademark). If we eliminate the special character from the main window title, the element tree shows fine when the visual profiler is attached. I was able to reproduce this issue in the simple blank WPF application too simply by putting the following property on the main window:
<Window ..... Title="Test Application™" >
Looks like a bug in Visual Profiler that somehow is triggered by special characters. I didn't test for other special characters, but likely it isn't just this one.
So the workaround is to remove the special character while you are profiling until they fix this.

Resources