Skip to main content

Notifications

Community site session details

Community site session details

Session Id : bWERx+j0caLBQt6nWEHQDx
Power Automate - Power Automate Desktop
Answered

Extract Data From a web page

Like (0) ShareShare
ReportReport
Posted on 17 Jul 2023 02:36:19 by 431

I am a newbie. I am trying to extract data from a web page. I am trying to extract 1 column from a table. This column is a column of links. using the UI Assistant, I wasn't able to click on the link. I could only extract the text. The "Anchor" kept disappearing. href did not appear in the dropdown that asks what I wanted to extract. So I inspected the page and found that the table has id="searchTable" and the link (a) had an id="#". I filled in the table as shown in the screenshot but the preview showed said i was extracting a 0 column table. Not sure what to do next.

  • Steve48 Profile Picture
    431 on 18 Jul 2023 at 12:57:42
    Re: Extract Data From a web page

    My problem with the data was that the first row was not as desired. I used the wrong action to delete it. I used "Delete Item From List" instead of "Delete Item From Data Table" Now everything works. Thank you again Agnius

  • Agnius Bartninkas Profile Picture
    10,045 Most Valuable Professional on 18 Jul 2023 at 12:55:14
    Re: Extract Data From a web page

    It requires 2 columns when you select a table as the output. You could select a list instead and then you would only be required to extract a single column.

     

  • Steve48 Profile Picture
    431 on 18 Jul 2023 at 12:49:13
    Re: Extract Data From a web page

    Thank you.  You were a big help. Now I see how to do it. That extracted the data. What's interesting is that I got an error because I left the 2nd row in the wizard was blank. When I filled it in with another CSS Selector the data got extracted. I actually wanted the href so I filled that in instead. The wizard forces you to extract at least 2 columns. I had a problem with the extracted data but I will close this topic and create a separate Post for that issue. 

  • Verified answer
    Agnius Bartninkas Profile Picture
    10,045 Most Valuable Professional on 18 Jul 2023 at 04:36:42
    Re: Extract Data From a web page

    Okay, seems like I misread your previous question a bit.

     

    Try using the following: 

    • Base CSS selector: table[Id="searchTable"] > tbody > tr
    • CSS selector (column 1): td:eq(1) > a 

    This will make it extract all rows and the 2nd column (because indexes are 0-based) from each row.

     

    Also, use the "Own Text" as the property that you are trying to extract from the value. I thought you wanted the Href, but it is actually simply "#" in there, so there's not much to extract. I assume you actually need the text value instead. So, using Own Text will get you that.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • Steve48 Profile Picture
    431 on 17 Jul 2023 at 14:00:07
    Re: Extract Data From a web page

     

    I am the OP.

    Hi I copied the selectors using Chrome inspector:  for the table it is #searchTable and for the link it is 

    #searchTable > tbody > tr:nth-child(2) > td:nth-child(2) > a

    but am not sure how to enter these into theHelper

  • Steve48 Profile Picture
    431 on 17 Jul 2023 at 13:39:42
    Re: Extract Data From a web page

    Agnius-Thank you for your response. I redid my entry as shown in the screenshot but still got a zero-column extraction.  So no good. In the attribute field, I entered href but it gets autocorrected to Href. 

    I am also attaching the result of my inspection which shows the selectors. for the <a> it seems as if class="linkToPage" might be a good selector but I was unsure how to enter it into the form. You can also see the tableSearch element but I was unsure how to enter more of it into the form. TIA Steve

  • Agnius Bartninkas Profile Picture
    10,045 Most Valuable Professional on 17 Jul 2023 at 03:36:39
    Re: Extract Data From a web page

    Try doing a[Id="#"] here:

    Agnius_0-1689564907184.png

     

    And leave the attribute as "href" only. What you put in there is not something that would ever work with PAD.

     

    Also, I would still suggest adding a bit more child elements into the Base CCS selector. Probably at least until you include a table row (<tr>) element.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Power Automate Desktop

#1
eetuRobo Profile Picture

eetuRobo 4 Super User 2025 Season 1

#2
KO-05050229-0 Profile Picture

KO-05050229-0 2

#2
stampcoin Profile Picture

stampcoin 2

Overall leaderboard
Loading started