Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 69088

Object Names for controls in Squish (GUI Tester)

$
0
0

Hey all,

 

Pretty obscure question here, hopefully someone out there has some ideas.  Our testing team uses a GUI testing tool called Squish.  You use this tool to record GUI interactions so you can automate mouse clicks, etc.  For software written in other languages (for example, Notepad++) Squish will refer to an object by a name or ID.  This allows the test to work no matter the resolution, location or size of the window.  For example:.  

 

function main() {
    startApplication("notepad++");
    mouseClick(waitForObject(":41001_ToolbarItem"));
    mouseClick(waitForObject(":41002_ToolbarItem"));
    mouseClick(waitForObject(":Open_Edit"), 312, 8, MouseButton.PrimaryButton);
    type(waitForObject(":Open_Edit"), "asdf");
    clickButton(waitForObject(":Open.Cancel_Button"));
    mouseClick(waitForObject(":_Pane_2"), 318, 161, MouseButton.PrimaryButton);
    type(waitForObject(":_Pane_2"), "asdf");
}

However for a LabVIEW application, Squish does not seem to assign any name to the controls(however window names are assigned), and instead refers to the object by relative location:

 

function main() {
    startApplication("DavidApp");
    doubleClick(waitForObject(":David_VI.vi_Window"), 38, 150, MouseButton.PrimaryButton);
    doubleClick(waitForObject(":David_VI.vi_Window"), 35, 199, MouseButton.PrimaryButton);
    mouseClick(waitForObject(":David_VI.vi_Window"), 183, 167, MouseButton.PrimaryButton);
    mouseClick(waitForObject(":David_VI.vi_Window"), 44, 37, MouseButton.PrimaryButton);
    mouseClick(waitForObject(":_Pane"), 45, 12, MouseButton.PrimaryButton);
    mouseClick(waitForObject(":David_VI.vi_Window"), 170, 224, MouseButton.PrimaryButton);
    mouseClick(waitForObject(":David_VI.vi_Window"), 470, 16, MouseButton.PrimaryButton);
}

So the question is does anyone know how to assign these Object IDs for LabVIEW controls?  It seems to be defined by the application, not by Squish.  Has anyone used Squish (or similar tools) for GUI automation of LabVIEW applications and had success?

 

(Cross post on LAVA)

 

Thanks,
-----
David Ladolcetta
Certified LabVIEW Architect
Cirrus Logic


Viewing all articles
Browse latest Browse all 69088

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>