Selecting all radio buttons

Hello,

I am trying to select all radio buttons on a screen. I have tried using a repeat function without success. Any suggestions? There are about 15 radio buttons on the screen. All look identical and I simply want to click on every one of them.

Thanks in advance!

Comments

  • What happens when you run the following code?
    repeat for each in EveryImageLocation("UnclickedRadioButtonImage")
        click it
    end repeat
    
  • Thanks for the reply!

    The code you referenced I was using and works great elsewhere but not at this one spot. I think I figured out why but can't figure out how to approach it.

    The images are found and then categorized by x:y. When the repeat runs it looks for them at their respective locations. The challenge is that when each image is clicked the screen expands a little and the next image is moved further down. Eggplant clicks where the image 'was' and calls it a success when I run this portion of the script only.
  • EggplantMattEggplantMatt ForumAdmin admin
    In this scenario, you can just do this:
    repeat while imagefound("UnclickedRadioButtonImage")
       click foundImageLocation()
    end repeat
    
    The one caveat would be if the expansion you refer to pushes unchecked buttons off the bottom of the screen, in which case you would need to add some scrolling to ensure that none of them were missed.
Sign In or Register to comment.