Access Websites

When creating a Desktop Automation workflow, you can open websites in the built-in browser and use action steps to extract information and navigate sites. The built-in browser is based on the selected engine, such as Chromium. To navigate, use Desktop Automation step actions. For more information about choosing a browser for your application, see Choose your browser.

Note Command timeout for browsing websites is set either on the Desktop Automation tab of the Design Studio Settings window for executing the workflow in Design Studio, or in the Desktop Automation section on the Security tab of the RoboServer Settings window for RoboServer execution. See Runtime > Security in the Kofax RPA Administrator's Guide.

Kofax RPA browser supports the following protocols:

  • http:
  • about:
  • https:
  • ftp:
  • file:

To open a website, insert the Browse step, select a browser engine in the Browser list, select Load Page as an action, and then specify all necessary parameters, such as the address in the URL field. Use the Tree Stops Changing guard after any step that includes loading a page or when other changes occur on a web page. See Guarded Choice for more information.

Note Currently, it is not possible to use the system clipboard to copy and paste content inside one or multiple robots while using the built-in browser.

Browser interface
The built-in browser in Desktop Automation contains the following controls.

Button

Description


Go back button in the built-in Kapow browser

Go back: Navigates one page back.


Go forward button in the built-in Kapow browser

Go forward: Navigates one page forward.


Reload button in the built-in Kapow browser

Reload: Reloads the current page. When the page is loading, the button displays a cross to notify that the browser is busy.


URL field

URL field: Contains either the URL of the currently loaded page or the URL you pasted before navigating to the page.


Navigate button

Navigate: Goes to the URL entered in the URL field. If you cannot see the button, scroll the Recorder View window to the right.


Save page button

Save page button: Saves the currently open page in HTML format. If you cannot see the button, scroll the Recorder View window to the right. For more information, see below.

Configure proxy settings

Configure proxy: Opens proxy configuration dialog box. If you cannot see the button, scroll the Recorder View window to the right. For more information, see below.

Print to PDF button

Print to PDF: Saves the currently open to a PDF file. If you cannot see the button, scroll the Recorder View window to the right. For more information, see below.

URL in the built-in browser

Browser window contains the URL text field in the toolbar. It shows the URL of the loaded web page. You can select the URL and extract the value into a variable using action steps. The tree view shows the URL as well.

  • To select the text in the URL field, click the URL field using the Click.
  • To change the address, click the URL field by using the Click step and enter the address using either the Enter Text step or from a variable.
  • To go to the entered URL, click the Navigate button to the right of the URL field.
Configure proxy

By default, all robots of the Desktop Automation Service use Kofax RPA global proxy settings. The Desktop Automation Service uses the same proxy settings as the Design Studio and Management Console. See Configuring Proxy Servers in Design Studio and Configuring Proxy Servers in Management Console for more information on proxy server properties.

Important Remember that the local proxy settings of the built-in browser in Desktop Automation Service have a higher priority than the Kofax RPA global proxy settings. Make sure the robot uses the Kofax RPA global proxy settings, unless the task requires it to use local proxy settings.
To change proxy settings for the built-in browser in Desktop Automation, click the Configure proxy button on the browser toolbar. The following proxy options are available:
  • Direct: Proxy is not used.
  • Fixed: Specify fixed proxy settings, such as host, port, and a bypass list.
  • PAC: Specify the URL of the proxy auto-configuration script file.
  • Auto: Click this option if your network provides for automatic proxy configuration, such as the Web Proxy Auto-Discovery Protocol.
  • System: select this option to copy proxy settings from the computer running your robot.

Once proxy settings are set, click OK to save the settings and close the dialog box.

Print to PDF
You can save a web page in the PDF format using the Print to PDF button on the browser toolbar.
  1. Click the Print to PDF button using the Click step.

    Once you execute the step, the browser opens the Save page as PDF document dialog box.

  2. Specify the full path including the file name using the Replace Text step. By default, the file is stored in the temporary files folder configured for the current user.

    Click OK.

    • Optionally, you can save the file to a robot file system by selecting Robot File System in the dialog box. In the RFS file name field, enter the path to the configured file system and the file name, such as myshare/downloaded.pdf. The file system name must correspond to that specified in the Robot File System section in the Management Console.

  3. Click Save.

To adjust the PDF file settings, such as page orientation, paper size, and scale, specify necessary options in the PDF Settings property of the Browse step.

Note If you want to send an opened HTML page or a document to a hardware printer, due to limitations with handling of pop-up dialog boxes for printer selection, the system automatically opens the Save page as PDF document dialog box instead, which enables you to save your document in PDF format on a file system or a Robot File System for further use.
Save page
You can save the currently opened page in HTML format using the Save page button on the browser toolbar.
  1. Click the Save page button using the Click step.

    Once you execute the step, the browser opens the Save As dialog box.

  2. Specify the full path including the file name using the Replace Text step. By default, the file is stored in the temporary files folder configured for the current user.

    Click OK

  3. Click Save.

Application-level actions

Application-level actions are actions applied to the entire application and available by right-clicking the application tab in the Recorder View. The list of application-level actions for the Chromium built-in browser includes:

  • Close Window: Adds a step to close an opened application window.

  • Execute JavaScript: Adds a step to execute JavaScript on the current page in the main window context.

    • In the JavaScript field, enter the code to execute.

    • In the JS Execution Result field, specify a text variable to store the result.

    • When Wait For Result is selected, the robot waits until the code is executed and the result is written into the "JS Execution Result" variable.

      The default timeout is 30 seconds. If the action is not completed within this time period, an exception is thrown. Also, if the JavaScript code contains errors, an exception is thrown.

      If you clear this option, the robot proceeds to the next step immediately after the code execution is started (without waiting for the execution to finish).

Component-level actions

Application-level actions are actions applied to the entire application and available by right-clicking an element in the Recorder View or the tree view. The list of component-level actions for the Chromium built-in browser includes:

  • Scroll To: Adds a step that scrolls the page to the selected element, so the element appears in the middle of the window.

Debugging with Chrome Inspector

Kofax RPA supports debugging in the Chromium browser engine using Chrome Inspector in the Device Action step. The Inspector can help you extract and save information necessary to analyze the interaction between the website and the browser and errors occurred during processing of the web content. Information is saved in the HTTP Archive (HAR) format. To save the log to a file, perform the following steps.

  1. Open cef.cfg file located at <Kofax RPA installation folder>\nativelib\hub\windows-x32\<hub version number>\node_modules\cef in a text editor.

    For example: C:\Program Files (x86)\Kofax RPA 11.1.0.0 x32\nativelib\hub\windows-x32\1267\node_modules\cef

  2. Set show_dev_tools property to true, save the file, and reload your robot.

    Once you execute the Browse step that loads a web page, the Chrome DevTools window attached to the corresponding web page opens.

  3. In the Chrome DevTools window, select the Network tab, click Preserve log, and press Ctrl+R. The network trace loads in the window.

  4. Right-click the trace and select Save all as HAR with content to save the network trace in a file. Now you can open the file in a HTTP Archive inspector.