web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Extracting text from m...
Power Automate
Unanswered

Extracting text from multiple pages

(0) ShareShare
ReportReport
Posted on by 13

There is probably a very easy solution to this, but I'm new to power automate. I'm trying to extract client information from their digital chart, and input that into text fields on a different webpage/tab. The problem I'm having is that the UI Elements on the client chart are linked to the clients specific web address. So if I try to extract the "Legal First Name" (see image below) using that UI element, it will only work on John Doe's chart and not any other client's chart because the web address is different. Hopefully that makes sense and I appreciate the help in advance! 

 

Screenshot 2022-10-27 16.53.31.png

I have the same question (0)
  • momlo Profile Picture
    1,527 Super User 2024 Season 1 on at

    Can you post the actual selector?

    I'm pretty sure we can try to find and disable elements specific to the person/url by unticking them

  • codyccw Profile Picture
    13 on at

    Thanks for responding. Although I'm not 100% sure what a selector is, hopefully my screenshot was what you're asking for. 

     

    Screenshot 2022-10-28 08.38.05.png

  • momlo Profile Picture
    1,527 Super User 2024 Season 1 on at

    Selector is a "path" to the specific element you want to collect, you posted the selector to the "FirstName" field.

    It is very basic and seems right to me.

     

    What we need to remember of is that each element sits in a "parent window" that has it's own selector.

    It is "box in a box" kind of situation": give em "first name" that exists in "window".

     

    So let's see the selector of parent window, can you double click here and post?

    I'm pretty sure we need to modify this to make it general, not URL specific:

     

    momlo_0-1667204672316.png

     

  • codyccw Profile Picture
    13 on at

    That makes sense. Below is the screenshot after double clicking the Web Page parent window. 

    Screenshot 2022-10-31 12.01.06.png

  • momlo Profile Picture
    1,527 Super User 2024 Season 1 on at

    hi @codyccw 

    I have set up a trial account on this web app and I was able to extract patient data with "extract data from web page action".

    I also tested updating the first name and last name and the site was not updating when using PAD actions (although selectors were correct) but I managed to update these with java script.

     

    Take a look at this, perhaps you could adapt to your needs (copy and paste into new flow).

     

    WebAutomation.LaunchChrome.LaunchChrome Url: $'''https://secure.simplepractice.com''' WindowState: WebAutomation.BrowserWindowState.Normal ClearCache: False ClearCookies: False WaitForPageToLoadTimeout: 60 Timeout: 60 BrowserInstance=> Browser
    WebAutomation.PopulateTextField.PopulateTextFieldUsePhysicalKeyboard BrowserInstance: Browser Control: appmask['Web Page \'https://secure.simplepractice.com/users/sign_in\'']['Input text \'user[login]\''] Text: user Mode: WebAutomation.PopulateTextMode.Replace UnfocusAfterPopulate: False WaitForPageToLoadTimeout: 60
    WebAutomation.PopulateTextField.PopulateTextFieldUsePhysicalKeyboard BrowserInstance: Browser Control: appmask['Web Page \'https://secure.simplepractice.com/users/sign_in\'']['Input password \'user[password]\''] Text: pass Mode: WebAutomation.PopulateTextMode.Replace UnfocusAfterPopulate: False WaitForPageToLoadTimeout: 60
    WebAutomation.PressButton.PressButton BrowserInstance: Browser Control: appmask['Web Page \'https://secure.simplepractice.com/users/sign_in\'']['Input submit \'commit\''] WaitForPageToLoadTimeout: 60
    WebAutomation.GoToWebPage.GoToWebPage BrowserInstance: Browser Url: $'''https://secure.simplepractice.com/clients/86efa90a64b82b46/edit''' WaitForPageToLoadTimeout: 60
    WebAutomation.ExtractData.ExtractList BrowserInstance: Browser Control: $'''html > body > div:eq(2) > div > div > div:eq(0) > main > div:eq(4) > div > div:eq(1) > div''' ExtractionParameters: {[$'''div:eq(0) > div > div > input''', $'''Own Text''', $''''''] } PostProcessData: False TimeoutInSeconds: 60 ExtractedData=> client1
    Text.Random UseUpperCaseLetters: True UseLowerCaseLetters: True UseDigits: True UseSymbols: True MinimumLength: 5 MaximumLength: 5 RandomText=> RandomText
    WebAutomation.ExecuteJavascript BrowserInstance: Browser Javascript: $'''function ExecuteScript() {
    $(document.getElementById(\'firstName\')).val(\'fname_%RandomText%\').trigger(\'keydown\').trigger(\'change\');
    $(document.getElementById(\'lastName\')).val(\'lname_%RandomText%\').trigger(\'keydown\').trigger(\'change\');
    }''' Result=> Result
    WebAutomation.PressButton.PressButton BrowserInstance: Browser Control: appmask['Web Page \'h ... 82b46/edit\'']['Button \'button primary\''] WaitForPageToLoadTimeout: 60
    Display.ShowMessageDialog.ShowMessageWithTimeout Message: $'''pause''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: True Timeout: 30 ButtonPressed=> ButtonPressed
    Text.Random UseUpperCaseLetters: True UseLowerCaseLetters: True UseDigits: True UseSymbols: True MinimumLength: 5 MaximumLength: 5 RandomText=> RandomText
    WebAutomation.GoToWebPage.GoToWebPage BrowserInstance: Browser Url: $'''https://secure.simplepractice.com/clients/b7f2998dcb733693/edit''' WaitForPageToLoadTimeout: 60
    WebAutomation.ExtractData.ExtractList BrowserInstance: Browser Control: $'''html > body > div:eq(2) > div > div > div:eq(0) > main > div:eq(4) > div > div:eq(1) > div''' ExtractionParameters: {[$'''div:eq(0) > div > div > input''', $'''Own Text''', $''''''] } PostProcessData: False TimeoutInSeconds: 60 ExtractedData=> client2
    WebAutomation.ExecuteJavascript BrowserInstance: Browser Javascript: $'''function ExecuteScript() {
    $(document.getElementById(\'firstName\')).val(\'fname_%RandomText%\').trigger(\'keydown\').trigger(\'change\');
    $(document.getElementById(\'lastName\')).val(\'lname_%RandomText%\').trigger(\'keydown\').trigger(\'change\');
    }''' Result=> Result
    WebAutomation.PressButton.PressButton BrowserInstance: Browser Control: appmask['Web Page \'h ... 82b46/edit\'']['Button \'button primary\''] WaitForPageToLoadTimeout: 60

     

     

     

  • Verified answer
    codyccw Profile Picture
    13 on at

    Thanks so much for your help! I was able to get it to work using these actions below. 

     

    Screenshot 2022-11-01 13.55.40.png

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard