ClickUIA - Dynamic AUTOID and CLASS

Advanced programming using WinTask scripting language

ClickUIA - Dynamic AUTOID and CLASS

Postby saby.bhasin on Mon Jan 18, 2016 8:04 am

Is there a way that I could find the AUTOID and CLASS values on the fly (while the program is running) and then substitute the values?
For example:

ClickUIA("[APP='iexplore.exe',CLASS='ATL:0C22E0C8',AUTOID='188408432']")

Everytime I run my script, there is a different value for CLASS and AUTOID and the script can't find the element on the page. I was thinking that if I can find the values and then substitute them, it'd click the menu item.

Like this:

ClickUIA("[APP='iexplore.exe',CLASS='"+ATL_VALUE+"',AUTOID='"+AUTOID_VALUE+"']")

FYI - I used the spy feature in Wintask and it gave me the above element name. Note that I'm trying to click an element present in Siebel CRM web interface.
saby.bhasin
 
Posts: 1
Joined: Mon Jan 18, 2016 7:42 am

Re: ClickUIA - Dynamic AUTOID and CLASS

Postby TechSupport on Mon Jan 18, 2016 9:52 am

Hello,

No it's not possible to find on the fly the UIA descriptor.

For the click, I would use a clickuia with offset : you find an element to click with a not changing UIA descriptor near the one you want to click, and you do the clickuia adding mouse coordinates to click the element that you really want to click.

At the end of this video : https://www.youtube.com/watch?v=gFYjjdzSVrA the offset parameters in clickuia are explained.

Regards.
WinTask Tech Support
TechSupport
 
Posts: 805
Joined: Thu Nov 16, 2006 9:58 am


Return to Scripts programming

Who is online

Users browsing this forum: No registered users and 3 guests

cron