I am looking for the best practise how to fetch the innerText of a <dd … class=“field-value”>-element which belongs to a
-element from which the innerText is tracked the GetAttribute-activity.
In other words, I need to scrape the text value from a <dd … class=“field-value”>-element [Green-box] which belongs to a <dt … class=“field-label”>-element [Yellow-box]. These, related to each other element-set is fit within a
which itself can be seen as a row within a <dl … class=“fields”>-(list)-element.
I am able to fetch the innerText of the desired <dt …>-(term)-element [Yellow box] with a GetAttribute-activity within the <dl …>-(list)-element. However, this term is merely the fifth list (row) item (pict one), however on ocassion is it the fourth list (row) item (pict two) in case the first list (row) item does not exists.
Every hint, video (tutorial) of example is welcome.
You should look into the Find Children activity. You can use it to get an enumerable of all the objects with class=“field-*” and then loop through them.
as the div element is parent to the dt and dd element you will have a chance to extract it with the help of data scraping (Table extraction , newer version)
as alternates we do have find children as mentioned above
Url: Marcanet
Its a open data portal (as stated at the bottom banner.
Click > Opciones avanzadas > 1) in box ‘Escriba el nombre…’ : xxxxxxx, 2) in ‘Clase de Niza’: yy and 3) in box 'Elige #… first select ‘Registro international’ and store the same number as in 1), then hit button [Buscar] > on the result page click link ‘registrada’, next, on the result detail page in section ‘Datos generales’ the date related to ‘Fecha de concesión’ needs to be fetched, the sixth row in case of the first parameter set (see below), however on certain occasions (with the other set of ‘nombre’ and related ‘clase’) the section ‘Datos generales’ does not have a ‘Denominación’ and the robot clicks on the row below instead of the ‘Fecha de concesión’ row, meaning the ‘Fecha de terminación’ value is scraped instead of the ‘Fecha de concesión’ value
Escriba el nombre Clase de Niza
(xxxxxxx) (yy)
1008952 35 (six rows)
1201873 32 (five rows)
Thanks Peter, I hardly slept, ha! You pushed me in the right direction, I managed to scrape a table with Data Scraping Tool (main ribbon), see
It is worth to mention, using the Data Scraping Wizard (Main Ribbon), it was a ‘pain in the xyz’ to point to the correct element, that was a real gamble game. I didn’t stop throwing pointers at my screen,. Finally I succeeded! Next step will be filter for the correct row to map the term what I’m looking for and fetch its related value.
As filter I implemented an AssignOperation activity to assign a FilteredDataTable to fetch the value related a term in the terms list in the ExtractDataTable through ExtractDataTable.Select(“[]=‘’”).CopyToDataTable(), next the subtracted KVP (the filtered row) is the key: FilteredDataTable.Rows[0][0].ToString() and the value: FilteredDataTable.Rows[0][1].ToString().