Tcl script

Ask general questions here.
rtheodo
Posts: 4
Joined: Wed Nov 18, 2015 4:00 pm

Tcl script

Post by rtheodo » Mon Jul 18, 2016 8:38 pm

Does Ranorex have the ability to support automatic testing of dialogs which are created from Tcl scripts?
If I attempt to inspect a widget on a Tcl created dialog, Ranorex Spy shows the 'checkbox' as a general 'button'. Thus, I can not validate a checked vs un-checked state of the 'checkbox' since it is listed in the XPath as a general 'button.

If Ranorex can not directly validate or use Tcl created dialogs, how are testers using Tcl dialogs in their tests if their AUT makes use of some Tcl created dialogs?

Thanks in advance for any assistance you can provide.

-R

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3954
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Tcl script

Post by odklizec » Tue Jul 19, 2016 7:17 am

Hi,

Please post a Ranorex snapshot (not screenshot) of the dialog in question. Also, please state your Ranorex version (actual is 6.0.1). It's pretty hard/impossible to suggest something reliable without more details about your app.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

rtheodo
Posts: 4
Joined: Wed Nov 18, 2015 4:00 pm

Re: Tcl script

Post by rtheodo » Tue Jul 19, 2016 2:56 pm

My apologies for not posting a snapshot originally. I am posting a snapshot (ref. APLauncherSnapshot.rxsnp) as part of this reply.

My version of Ranorex is 5.4.3.26106 running on Windows XP.

My AUT is also running on the same PC.

I would like to be able validate and use all of the widgets on the dialog shown in the snapshot. However, I am currently focusing on validating and using the 'checkboxes' and I am unable to validate their checked / un-checked state since they are in the path as buttons (not checkboxes). Changing their 'role' type to checkbox makes them un-findable when I attempt to do a 'Highlight Element'.

The 'ConnectOnly' checkbox path is: /form[@title='Launcher']/element/element[@class='TkChild']/element[@instance='0']/button[@class='Button' and @instance='0']

-R
Attachments
APLauncherSnapshot.rxsnp
Snapshot of Tcl created dialog
(27.19 KiB) Downloaded 27 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3954
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Tcl script

Post by odklizec » Tue Jul 19, 2016 4:48 pm

Hi,

Apparently the only way how to validate checked/unchecked state of these "checkboxes" is to validate availability of "Checked" string in AccessibleState:
AccessibleState_Checked.png
AccessibleState_Checked.png (15.14 KiB) Viewed 487 times
If the AccessibleState of given checkbox does not contain "Checked" then it's most probably unchecked ;)

I would also suggest you to use GDI Capture List (as described here), which could help you with obtaining labels for each button. Although using GDI Capture List could be a bit painful, it's definitely useful in cases Ranorex is not able to obtain some GUI texts due to poor, missing or incorrect implementation of accessibility (typically legacy GUI technologies, which I guess is also a case of TCL?).
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

rtheodo
Posts: 4
Joined: Wed Nov 18, 2015 4:00 pm

Re: Tcl script

Post by rtheodo » Tue Jul 19, 2016 9:37 pm

Thanks for the information! I will give your suggestions a try.

-R