Hints, tips and tricks for newbies
Moderators: Dorian (MJT support), JRL
-
mcossari
- Newbie
- Posts: 3
- Joined: Thu May 15, 2014 5:03 pm
- Location: Brazil
Post
by mcossari » Sun Nov 16, 2014 1:37 pm
Hi
I am using UIClick to interact with a object, but there are 2 objects with same name in the screen.
MS Command:
Code: Select all
UIClick>{"::.. Simulador de Alçadas ..:: -- Versão : 1.0.0.17 -- File Version : 1.0.0.17"},{"Home"}
One of them is a "MenuItem", the other is a "Label", is it possible to handle this issue?
Thanks in advance.
Marcio
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Mon Nov 17, 2014 9:21 am
This is the problem with apps that have not been made fully "accessible" and we don't end up with unique identifiers. Windows is left to name things based on labels.
What you can do is use UIGetValue instead. This will return a list of the items and their positions. So you should get a list of the two matching items and a list of positions. You can figure out if the one you want is the first or second. Use Separate to get the items out and then use the positions to move the mouse and click.
So something like:
Code: Select all
UIGetValue>{"::.. Simulador de Alçadas ..:: -- Versão : 1.0.0.17 -- File Version : 1.0.0.17"},{"Home"},theVals,thePositions
//let's say you want the second one ...
Separate>thePositions,|,parts
Separate>parts_2,pos
Separate>pos,COMMA,xys
MouseMove>xys_1,xys_2
LClick
-
mcossari
- Newbie
- Posts: 3
- Joined: Thu May 15, 2014 5:03 pm
- Location: Brazil
Post
by mcossari » Mon Nov 17, 2014 2:51 pm
Thank you for your reply.
But I will facing this problem because I defined this command on beginning:
I handled this issue.
Thanks.
- Marcio