Selecting a specific button in katalon

Hey guys,
I have a little question, maybe someone can give a little advice on this:
I have a web page, let’s say it’s a booking website with multiple hotels, and every hotel displayed has a “book now” button.
My question here is, how do i select a specific button? Manual recording did not help on this one.
How do we choose for a specific button that is present multiple times on a page?

Thanks!

Hi Alex,

you may want to find some other identifier rather than button text. What about HTML element’s id? If you want, you can add a snippet from your page’s source code and we may find something.

The “Rezerva” button is the one i am talking about

katalon.jpg

Is there any unique element in parent box? I.e. offer ID or specific route details. We can use also parent’s identified to identify Rezerva button.

There is no unique identifier for every button

I meant identifier for whole parent

element. Can you share source code for whole box?

2018-06-05 09_27_58-wu8jkqapmoe3.jpg (1191×749).jpg

       <span><i class="fa fa-plane fa-lg"></i> Dus:</span>

     </div>
  <span>

  Vin      21.09.2018

  </span>
  <span>

  Vin      21.09.2018

  </span>
               </div>
                          <div class="segment clearfix">
  <img src="https://media.cdn.flygogroup.com/companies/FR.gif" alt="Ryanair" title="Ryanair" class="img-responsive">

  <span class="semibold company">

  Ryanair

  </span>
  <div class="departure-info">

     <span class="city blue">

       Bucuresti

     </span>

     <span class="airport">Otopeni </span>

     <span class="hour">20:50</span>

  </div>
  <div class="arrival-info">

     <span class="city green">

       Bruxelles

     </span>

     <span class="airport">Charleroi</span>

     <span class="hour">22:50</span>

  </div>
  <span class=""><span class="semibold hidden-xs">Escale:</span>

     Zbor direct              </span>

        <span class=""><span class="semibold">Id zbor:</span> FR2104</span>

        <span class="" title="Durata zbor">

  <span class="semibold">Durata:</span>

         3 ore, 0 min.            </span>

     </div>
                       </div>

                    </div>

                                            <div class="action">

                                                 <div class="misc clearfix">

                          <a href="" class="close-tile cf"><i class="fa fa-times-circle fa-lg"></i></a>

                          <a href="https://plus.google.com/share?url=http%3A%2F%2Fwww.fly-go.ro%2FrezultateCautare%2FVkJIMEJhd0J0VVZ2RDUvNmcrYWRGWXBrWERxdnZycVpRaHlOMC95WmpDeWZBRGRxWnFkcHg1N29FZ3lSR2JVOQ%3D%3D" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" class="tip" title="" data-original-title="Share with Google"><i class="fa fa-google-plus-square fa-lg"></i></a>

                          <a href="#" data-url="http%3A%2F%2Fwww.fly-go.ro%2FrezultateCautare%2FVkJIMEJhd0J0VVZ2RDUvNmcrYWRGWXBrWERxdnZycVpRaHlOMC95WmpDeWZBRGRxWnFkcHg1N29FZ3lSR2JVOQ%3D%3D" class="tip fbShare" title="" data-original-title="Share with Facebook"><i class="fa fa-facebook-square fa-lg"></i></a>

                          <!\-\- <a href="" class="tip" title="Trimite unui prieten"><i class="fa fa-envelope-square fa-lg"></i></a> -->

                       </div>

                       <div class="main">

                          <strong class="price">22 €</strong>

                          <a href="#" class="book">

                          Rezerva &nbsp;

                          <i class="fa fa-arrow-circle-right"></i>

                          </a>

                       </div>

                                               </div>

                                         </div>

              </form>

           </div>

And what about flight number? Is this part unique for all reservations?

<span class=""><span class="semibold">Id zbor:</span> FR2104</span>

If there is really nothing unique, the only way how to click specific button is to find the button by index.
You can get i.e. third button on the page using this xpath:

(//a[@class="book"])[3]

Yes, flight number is unique, but changes from search to search