Get text of an attribute

Hey there! I have a little question
image
I want to get that text (Guarulhos intl.) from “GRU” But I don’t know how…

The page that i’m in is LATAM: https://www.latam.com/
This is the link: https://www.latam.com/es_ar/apps/personas/booking?fecha1_dia=29&fecha1_anomes=2019-12&auAvailability=1&ida_vuelta=ida&vuelos_origen=Sao%20Paulo&from_city1=SAO&vuelos_destino=Buenos%20Aires&to_city1=BUE&flex=1&vuelos_fecha_salida_ddmmaaaa=28/12/2019&cabina=Y&nadults=3&nchildren=0&ninfants=0&cod_promo=#/

There’s a attribute called “abbr title”, but i can’t get it with get attribute

@Enzo_Rossetti
Get Attribute Activity would be the first option - the title attribute of the ABBR element has the Information: Guarulhos intl.

I know, but how can I do that? Sorry, i’m a rookie in this haha!

@Enzo_Rossetti
are you interested only on GRU or on All like EZE, CGH as well?

I am interested in all those items :smiley:

@Enzo_Rossetti
Ok give me some time I will work out a sample for you after having my dinner

Thank you!!

@Enzo_Rossetti
Here we go:

Working with get Attribute for a single Code:
grafik

Let point the selector to the ABBR Element (Similiar what you have done above)
Fetch Attribute “title” and assign to an output Variable (In that case txtABBR1_Title)

I would recommend to you to get very quickly familiar with those essentials.

Fetching ALL Codes:
There are multiple options. For Starter Level following approach is using only essentials:

By Analyzing the Website

  • all ABBR Codes are childen of the span of class: ground-point-name
  • all spans of class: ground-point-name are children of an UL Element

  • the first find children finds all spans of class: ground-point-name
  • For each loop over all spans
  • For each span with second find children the ABBR is fetched
  • With adding the ABBR text/code a simple deduplication of duplicate text/code pairs can be realized

And for demo purpose all is logged out:
grafik

with the result of:
grafik

Here is the demo XAML and do also debugging for further analyzing: Enzo_Rossetti.xaml (13.3 KB)

Let us know for feedback and flag the solving post as solution. So other members can benefit from it. Happy automation :slight_smile:

3 Likes

You’re great, pal!
It worked perfectly!!! Thank you very much for the help!!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.