Conditions - visible button without coding

Ranorex Spy, Recorder, and Studio.
Milos23
Posts: 1
Joined: Tue Jan 07, 2020 12:44 pm

Conditions - visible button without coding

Post by Milos23 » Tue Jan 07, 2020 2:27 pm

Hi,

I started using trial version of your ranorex Studio. It is a great tool and program, but i want to know if there is a way to detect all buttons on website (web app) and set the condition without coding or do I have to code?

The condition: if I find button1 - click on it, else skip this the step.

Is there anyway to use a condition for this in SmartFolder?

Thank you very much

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6027
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Conditions - visible button without coding

Post by odklizec » Tue Jan 07, 2020 3:25 pm

Hi,

I don't think that there is a reasonable way to achieve what you've described without coding. At first, you may be able to get the list of all button on web, using a properly designed xpath, which returns all buttons you are interested in. And then, you should use a piece of code to loop through the list of buttons (returned by xpath) and do whatever you want with them. For an example of code for looping UI elements, check for example these posts:
https://www.ranorex.com/forum/unable-to ... tml#p54822
https://www.ranorex.com/forum/iterate-t ... tml#p51724
https://www.ranorex.com/forum/basic-but ... tml#p40688
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration