[jawsscripts] Re: UIA - creating FSUIAConditions

  • From: Soronel Haetir <soronel.haetir@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Tue, 7 Jul 2015 10:42:57 -0800

The find idea is actually pretty good, I am taking a look at the
visual UIA verify source to see how hard that would be to add.

On 7/7/15, Travis Roth <travis@xxxxxxxxxxxxxx> wrote:

I find uses for both ways.
But can either way automatically record the path? And I also wish Visual UIA
Verify had a search feature as it is very tedious to hunt for an element
when I already do know its name.


-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Soronel Haetir
Sent: Tuesday, July 7, 2015 10:20 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: UIA - creating FSUIAConditions

But I still don't find advanced navigation as useful as having a program
that show a tree of all the elements that are available. And then a list of
property values.

With touch navigation (even in advanced mode) I find myself doing far more
hunting around trying to find a path from one object to whatever it is I am
trying to reach. With a tree view instead of touch navigation I don't for
instance waste time trying to go down into a pane that doesn't actually have
any children, with a tree that information is simply part of the navigation
experience.

On 7/7/15, Bissett, Tom <tom.bissett@xxxxxxx> wrote:
It is in the help under using the touch cursor Tom Bisset
-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Roth
Sent: Tuesday, July 07, 2015 8:42 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: UIA - creating FSUIAConditions I know about
touch navigation, however I have not used Advanced. Is that in the
help system somewhere?
What it seems we need then with touch navigation, is when find an
object we're interested in for scripting, a utility to record how to
programmatically locate it. Wouldn't solve everything but would speed
up some things.



-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Jim Snowbarger
Sent: Monday, July 06, 2015 9:03 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: UIA - creating FSUIAConditions

Right. This point was raised to me when I suggested to FS that they
have all the tools to make object navigation, which is what the NVDA
enthusiasts like to brag about, a regular part of jaws. They already
have it! It was just called something else.
I bet most people don't understand that. It escaped me.




-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Jim Bauer
Sent: Monday, July 06, 2015 5:54 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: UIA - creating FSUIAConditions

I'm a UIA newbie and I like using the JAWS touch cursor for
discovering basics. With advanced mode enabled, you're exploring a raw
view tree walker.
You can press alt+enter on an element to get a user buffer of properties.
This doesn't let you test conditions or patterns against your
navigable tree though.

Credit to Doug Lee (for bringing to light the fact that you don't need
a touch device to use the touch cursor, which is what I just naturally
assumed). :-)

On 7/6/2015 4:59 PM, Travis Roth wrote:
Ok, thanks.
I downloaded the latest 8.1 SDK and found it there. It is not the
same program as I already had, which was something older I think.


-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Soronel Haetir
Sent: Monday, July 6, 2015 4:11 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: UIA - creating FSUIAConditions

What I use is found at C:\Program Files (x86)\Windows
Kits\8.1\bin\x64\UIAVerify\VisualUIAVerifyNative.exe

When I start the program focus is in a tree view that is rooted at
the desktop and can be expanded to show all of the UIA elements
available.
If I hit tab focus changes to the property view window. Tabbing twice
from there switches to the test selection view. Tab again from there
takes me to the test run result pane.

Getting out of the test result pane is always trouble, the only
reliable way I have found for doing that is to use the jaws cursor
and click on one of the other windows, usually the element tree.

On 7/6/15, Travis Roth <travis@xxxxxxxxxxxxxx> wrote:
Hmm, I wonder if there is more than one app masquerading with the
same name as I got this one from the Windows SDK but it does not
quite match what you have.


-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Soronel
Haetir
Sent: Monday, July 6, 2015 3:11 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: UIA - creating FSUIAConditions

I find the ClassName property listed under the Identification group
along with AutomationId, ControlType etc. You do not need to run a
test in order to get that info. All I do is select the element I
want the properties for from the tree hit tab then go up and down
the list.

There are groups for General, Identification, Patterns, State and
Visibility. Perhaps the group is collapsed and you didn't notice that?

On 7/6/15, Travis Roth <travis@xxxxxxxxxxxxxx> wrote:
Hi,
Soronel you mentioned using Visual UIA Verify to find the
UIA_ClassNamePropertyId. Where is this shown in the application?
When I run a verification and get to the UIA Tree tab I do not find
this?
I find things such as name, value, control type? Must I select a
specific test?

I am attempting a test script in order to get the idea of UIA. For
this I am trying to find the "Message Bars" notification area in
Outlook 2013.
Since I don't know the UIA_ClassNamePropertyId but do have the name
"Message Bars" I tried creating a StringPropertyCondition using
UIA_NamePropertyId but this is failing.
Any ideas?
Sample code:
var object UIA = CreateObjectEx ("FreedomSci.UIA", false,
"UIAScriptAPI.x.manifest" ); var object appObject =
UIA.GetElementFromHandle(GetAppMainWindow
(GetCurrentWindow ()));
var object messageCondition =
UIA.CreateStringPropertyCondition(UIA_NamePropertyId, "Message
Bars"); assert(messageCondition, "Failed to create message
condition"); //this passes var object element =
appObject.FindFirst(TreeScope_Children,
messageCondition);
assert(element, "Failed to find message condition") ;//this fails
var object treewalker = UIA.CreateTreeWalker(UIA.RawViewWalker);
assert(treewalker, "Failed to create tree walker") ; //this fails




-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Soronel
Haetir
Sent: Thursday, May 7, 2015 1:39 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: UIA - creating FSUIACondtions

I did rewrite that using an And condition )to get rid of the loop),
from the FindAll line it is now:

var object child = element.FindFirst(TreeScope_Children,
uia.CreateAndCondition(tabItemCondition,
uia.CreateNotCondition(uia.CreateStringPropertyCondition(UIA_NamePr
o
p
e
rtyID,
"ContentManagerView"))))
Assert(child, "Failed to obtain children of DocumentGroup")

var object selection = child.GetSelectionItemPattern()
Assert(selection, "Failed to get selection item pattern")

selection.Select()



On 5/6/15, Soronel Haetir <soronel.haetir@xxxxxxxxx> wrote:
I got the value UIA_ClassNamePropertyId out of uia.jsh, I used
visual uia verify (from
https://uiautomationverify.codeplex.com/releases/view/112069) to
get the value "TabItem".

I do seem to recall a problem with downloading visual uia verify
now, but I also seem to recall it is also included as part of the
platform sdk from Microsoft. I suppose it would also be possible
to use the jaws script utility mode to get that info but not
nearly as easy.

An example use is:

var object appObject =
uia.GetElementFromHandle(GetAppMainWindow(GetCurrentWindow())),
object element = appObject.FindFirst(TreeScope_Children,
uia.CreateStringPropertyCondition(UIA_ClassNamePropertyID,
"DockRoot"))
Assert(element, "Failed to find DockRoot element")

element = element.FindFirst(TreeScope_Children,
uia.CreateStringPropertyCondition(UIA_ClassNamePropertyID,
"DocumentGroup"))
Assert(element, "Failed to find DocumentGroup element")

var object children = element.FindAll(TreeScope_Children,
tabItemCondition) Assert(children, "Failed to obtain children of
DocumentGroup")

var int position = 0,
object item
While children.Count > position && not item item =
children(position) position = position + 1 If "ContentManagerView"
== item.Name Then item = Null() EndIf EndWhile

If not item
SayString("Failed to find a content tab item") Return EndIf

var object selection = item.GetSelectionItemPattern()
Assert(selection, "Failed to get selection item pattern")

selection.Select()


Assert is a debugging function I use to test conditions that
should always be true:
void Function Assert(variant value, string message) If not value
Then
SayString(message)
EndIf
EndFunction


It would likely be possible to get rid of the while loop by using
an And condition (combining the test for being a tab item and not
the content manager tab but I didn't bother.



On 5/6/15, John Robichaud <John_Robichaud@xxxxxxxxxxx> wrote:
Soronel,
Can you show an example using FindAll and/or FindFirst?
Where did you get the parameters for CreateStringPropertyCondition?
John Robichaud

-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Soronel
Haetir
Sent: Wednesday, May 06, 2015 6:12 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: UIA - creating FSUIACondtions

I haven't used conditions with CreateTreeWalker (except for the
built-in
TrueCondition) but I do use then with FindAll and FindFirst

Here's an example of creating a condition object:

var object tabItemCondition =
uia.CreateStringPropertyCondition(UIA_ClassNamePropertyId,
"TabItem")


On 5/6/15, John Robichaud <John_Robichaud@xxxxxxxxxxx> wrote:
Can anyone give an example of first creating a FSUIACondition
and then using it with CreateTreeWalker() to traverse an UIA tree?
This could very useful but I don't really understand the concept
of creating the condition.
John Robichaud





__________?

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts




--
Soronel Haetir
soronel.haetir@xxxxxxxxx
__________?

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts

__________

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts




--
Soronel Haetir
soronel.haetir@xxxxxxxxx



--
Soronel Haetir
soronel.haetir@xxxxxxxxx
__________

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts


__________

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts




--
Soronel Haetir
soronel.haetir@xxxxxxxxx
__________

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts


__________

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts




--
Soronel Haetir
soronel.haetir@xxxxxxxxx
__________

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts


__________

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts


__________

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts




__________

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts


__________

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts

__________

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts




--
Soronel Haetir
soronel.haetir@xxxxxxxxx
__________

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts


__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts




--
Soronel Haetir
soronel.haetir@xxxxxxxxx
__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts

Other related posts: