I want to write code in the script that will say whether a check box is checked or not. I have a page full of checkboxes created in a dialog. Is there an easy way to determine whether the boxes are checked??
Re: checkbox checked? in IE - any easy way to tell?
I would think that the CtrlChecked() command should work... but I can't get it to work on the yes/no radio buttons of the QA Forums preferences page. I get the error "Command cannot be performed on the specified control."
I have tried several ways to identify the control for RadioFind(), I get the same handle number each way, except someways don't work that I think should. I would be calling Compuware support if I had to get this to work.
Only the below RadioFind() options returned a handle
CtrlChecked( RadioFind( "!~1" ))
CtrlChecked( RadioFind( "@yes radio" )) ;created an object map.
"For words are like prescription lenses; they obscure what they do not make clear."-Stefan Kanfer, Time, 1977
...which will tell you if the web-page came with the checkbox pre-checked. It should be pretty clear once you do it, although you have to be careful because sometimes you need to grab on to NotePad, and sometimes WordPad. Do a "Ctrl-A, Ctrl-Shift-End, Ctrl-C" to get the source into the clipboard where you can access it with the ClipBoard() functions in QARun. Hopefully I'll have some time to clean up some of our Browser library functions for outside distribution (including some functions like "view source" :^)