html-async-fetch
Service icon

HTML Async Fetch

Stable version 1.0.1 (Compatible with OutSystems 11)
Uploaded
 on 4 Jun
 by 
5.0
 (7 ratings)
html-async-fetch

HTML Async Fetch

Documentation
1.0.0
Before starting 

  1. Install the last version of the component
    Please consult the HTML Async Fetch component available in the OutSystems Forge and ensure that the latest version is installed in your environment. If it's not, kindly proceed with the installation. This component operates independently, without any dependencies. At this moment, you may now download and install the demo application.


  2. Create a component dependency
    In the desired module that should include the HTML Async Fetch, open the 'Manage Dependencies...' option (1), search for ‘HTMLAsyncFetch’ (2) and import the ‘GetHTMLByDivCssClass’ and/or ‘GetHTMLWrapper’ actions (3). Apply your changes.

UsingHTML Async Fetch

  1. Drag and drop the Imported Action ‘GetInnerHTMLByDivCssClass’ or ‘GetHTMLWrapper’
    In the action element that you want to use this conversion drag and drop the imported ‘GetInnerHTMLByDivCssClass’ or ‘GetHTMLWrapper ‘ actions. It is located under the HTMLAsyncFetch’ Reference, in the ‘Logic’ tab.
     
    Note: If you want to use a CSS selector to be more specified with what you retrieve from HTML you should use ‘GetInnerHTMLByDivCssClass’ action.

  2. Fill in the Action input parameters 
    Both ‘GetInnerHTMLByDivCssClass’ or ‘GetHTMLWrapper’ mandatory parameters must be filled in. Consult the parameter details below.
    •   URLText | Mandatory - URL from where to fecth the HTML.
    •   Selector - Text | Mandatory - A selector, using the syntax from CSS selectors. You can read more here: https://www.w3schools.com/css/css_selectors.asp
    •   Locale - Text | Optional - Locale preferences for the user interface. You can read more here: https://gist.github.com/eddieoz/63d839c8a20ef508cfa4fa9562632a21
    •   IsMobileBoolean | Optional - True if you want to get the HTML rendered in a phone viewport.
    •   WaitForNetworkIddle  Boolean | Optional - Flag that indicates if it's to wait for network iddle before getting the HTML.
Retrieve HTML
After filled in all mandatory input parameters the action is good to go. You can use it and you will retrieve the HTML of the URL that you pretend.
Note: URL should contain 'http://' or 'https://' to work

To test
You can try with URL: https://www.outsystems.com and selector: .homepage