How to check the Radio button value if its checked

How to check the Radio button value if its checked

Home Forums Ask Expert How to check the Radio button value if its checked

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #32883
    Sasha ZAP
    Moderator

      Hello Adil,
      Basically you do it like this:
      1. Scan the GUI and set object as Image inside the Radio-button.
      2. Use a similar code as the following to determine the actual color of the Radio-button’s inside:
      If the inside color of a Radio-button is white it means the Radio-button is not clicked yet:

      strColorName = Application(“Application”).View(“View”).Object(“RadioButton”).GetAverageColorName
      If strColorName = “WHITE” Then
      Application(“Application”).View(“View”).Object(“RadioButton”).Click ‘Click on the Radio-button if it is not clicked
      End If

      Hope this helps.

      Thanks,
      ZAPTEST Team

    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.

    Virtual Expert

    ZAPTEST

    ZAPTEST Logo