Jump to content
Sign in to follow this  
Silverlode

Can't get state of radio button

Recommended Posts

Hello everyone.

I have a dialog in an application I'm doing some automation testing for that has radio buttons for which I need to state of each.  They're all returning "0".  Here's my code right now:

$state01 = ControlCommand("User Defined Accounts", "", "[NAME:radioButton_Output_Items]", "IsChecked", "")
MsgBox(0, "", $state01)

I've also tried _GuiCtrlButton_GetCheck.  Nothing works.  "0" is always returned.  Any ideas?

Thank you.

Share this post


Link to post
Share on other sites

I CAN give it focus.  Return is "1".

Even THEN, after giving focus, my IsChecked is returning "0" (despite it being checked).

Share this post


Link to post
Share on other sites

Looks like the control you're getting might be a collection of controls

"[NAME:radioButton_Output_Items]"

Try

$state01 = ControlCommand("User Defined Accounts", "", "[TEXT:Items]", "IsChecked", "")

Share this post


Link to post
Share on other sites

Could just be that this .net window is not going to play ball, and you may have to use UIAutomation UDF in example scripts.

Have you tried using the ID directly?

$state01 = ControlCommand("User Defined Accounts", "", 329246, "IsChecked", "")

Share this post


Link to post
Share on other sites

Bad news then for getting info from conventional API.

Looks like you'll have to try your hand with other UDF.

'?do=embed' frameborder='0' data-embedContent>>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...