2

I'm trying to see if a radio box is checked. I tried the method that the Squish documentation gave for Qt applications, but it did not apply for Windows applications.

radio = waitForObject(":Options_RadioBox")
if not (radio.checked):
    clickButton(radio)

Any help would be greatly appreciated!

user1522860
  • 113
  • 1
  • 6
  • What was the error message? Are you able to record tests using Squish? What Squish/Windows/Qt versions are you using? – dbn Nov 15 '13 at 22:39
  • Assuming that the `waitForObject` call worked, i.e. it did not raise an exception, you can use [`object.properties()`](http://doc.froglogic.com/squish/latest/rgs-squish.html#object.properties-function) to enumerate the available properties. Maybe the property is called differently (`selected`?). – Frerich Raabe Nov 26 '14 at 22:19

2 Answers2

0

Your code looks fine. I'm guessing Squish is unable to access the native Windows form object. Make sure you're using the correct version of Squish for Windows, not for Qt or Java. The Squish for Windows package includes additional DLLs and EXEs that are necessary for full support of Windows controls.

See this article for more details.

Jake Stoeffler
  • 2,662
  • 24
  • 27
0

I checked this in Squish and found that the the CheckBox do have a property named checked.

If you are using the right version for windows application testing, the problem may be that the checkbox that you are trying to access is not the standard component, the designer of the application may customize the Checkbox. If so, you can try some native method of the script language to get the information, in python, you can use win32gui.