Web Browser - Check

Declaration

<AMWEBBROWSER ACTIVITY="check" PATH="text" HTMLID="text" HTMLNAME="text" HTMLTAG="text" HTMLCONTENTS="text" USEMATCH="text" SESSION="text" BROWSER="text (options)" URL="text" EXTENSIONS="text" IEMODE="YES/NO" CHECKACTIONMODE="text (options)" EXPRESSION="text"><HTMLATTRIBUTE NAME="text" VALUE="text" /></AMWEBBROWSER>

Related Topics   

Description

Selects or clears a checkbox on the currently active web browser web page.

NOTE:
  • The Web Browser action is not backwards compatible with the Web Browser (Legacy) action.
  • This activity is compatible with Chrome, Edge, and Firefox browsers only – Internet Explorer is not supported.
  • The browser you specify must be updated to the latest version and installed on the target system to ensure the Web Browser action functions correctly.
  • Unlike other session-based actions where sessions are optional, the use of a session in the Web Browser action is required as each created session explicitly links to a specific web browser instance. A session is created using the Web Browser - Create session or Web Browser - Open activity. Numerous sessions are supported within a single task, however, since Web Browser actions are performed interactively (and not in the background), each session must run concurrently to avoid sending interactions to the wrong browser window.

Practical usage

See Description.

Parameters

Location

Property Type Required Default Markup Description
Session name Text Yes BrowserSession1 SESSION="mySession" The name of the existing session to use with this activity. Numerous sessions can exist within a single task allowing several web browser operations to be performed simultaneously on separate browser windows.
NOTE:
  • This activity supports Web Browser sessions in Chrome, Edge, and Firefox browsers only – Internet Explorer is not supported.
  • Firefox does not require a separate extension to be installed with this version of the Web Browser action.
Select browser --- --- --- --- You can use Automate Desktop's Window Dissection technology to facilitate the discovery of existing windows and their controls.

To select the target browser Automate Desktop's Window Dissection technology window:

  1. Open the web browser window and ensure it is in the foreground (that is, in front of all other open windows).

  2. Click, drag, and then drop the magnifier icon over the window. A green border will appear around the window if it is supported by this activity.

  3. After selecting the window, the Browser and URL parameters will populate with the appropriate values.

To manually select the target browser window:

  1. Enter the desired URL in the URL box.

  2. Click Open.

NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes.
Browser Text(options) Yes Chrome
  • BROWSER="chrome"
  • BROWSER="edge"
  • BROWSER="firefox"
Specifies the web browser to use with this activity. The available options are:
  • Internet Explorer - This browser is not supported with this activity.
  • Chrome (default)
  • Edge
  • Firefox
NOTE:
  • This activity supports Web Browser sessions in Chrome, Edge, and Firefox browsers only – Internet Explorer is not supported.
  • Firefox does not require a separate extension to be installed with this version of the Web Browser action.
URL Text Yes (Empty) URL="www.google.com" The URL this activity should be performed on (for example, www.fortra.com or https://www.fortra.com).
Load extension(s) Text No (Empty) EXTENSIONS="C:\Users\User\Documents\AutoMate 2024 Tasks\settings.crx" Specifies the path and file name of the Chromium-based browser extension file(s) (.crx) to load. This can be a fully qualified path and file name, or a single file. Multiple files are specified by clicking the folder icon , and then selecting each desired file, or by manually entering and separating each path and file name with a pipe character (|) (for example, c:\temp\*.crx|c:\backup\*.crx). This parameter becomes available when the Browser parameter is set to Chrome or Edge.
NOTE:
  • Loading an extension file uninstalls and replaces any existing extension file currently in use by the user's profile.
  • Creating a browser session with a user's profile and then loading an extension file into that session will cause additional browser instances (launched manually or in Automate Desktop) to also load the same extension file.
Enable IE mode Yes/No No No IEMODE="YES" If selected, enables Internet Explorer (IE) mode which provides legacy support for Internet Explorer-based websites and applications in the Edge browser. This parameter becomes available when the Browser parameter is set to Edge and disabled by default.
Locate HTML elements --- --- --- --- The following parameters relate to the specification of HTML elements required to identify the object to use with this activity.

To pinpoint an HTML element (in this case, the button to click):

  1. Enter the desired URL in the URL parameter.

  2. Click Open. The Click (hand) icon becomes enabled.

  3. Click the Click (hand) icon, and then select the desired control in the browser window. If the control is supported by this activity, a blue border appears around it.

To interact with a web page before selecting the desired element, (for example, open a menu to select a menu item):

  1. Hold down the CTRL key on your keyboard, and then click on the web page to navigate to the element.

  2. After locating the element, release the CTRL key, and then click on the element.

Additional parameters become available, based on the element and its properties. You can further fine tune your selection by editing these parameters.

NOTE:
  • This parameter does not support the selection of cross-domain iframes on Edge, Chrome, and Firefox browsers.
  • The overall speed and accuracy of an element search is highly dependent on the contents of an HTML document, as well as the type of criteria being used to search for the element. Using an element's unique ID as a search method is considered the fastest and most accurate method of locating an HTML element because an element ID is always unique within an HTML document.
Path within the document hierarchy Text No (Empty) PATH="/outer/inner/" If the desired control is located within a floating frame, you can specify a frame hierarchy in this field. The specifier is a list of slash delimited frame identifiers (for example, "/outer_frame/inner_framer/").
Locate by identifier (best method) Text No (Empty) HTMLID="unique_ID" If enabled, searches the specified unique ID of the target element. Specifying an element's unique identifier (where supported) is the fastest and most accurate method of locating an HTML element due to the fact that an ID must be unique within the HTML document. This parameter is disabled by default.
Locate by name (certain elements) Text No (Empty) HTMLNAME="element_name" If enabled, specifies that the unique name identifying the target object will be searched. Specifying an element's unique name (where it is supported) is a fast and accurate method of locating an HTML element due to the fact that an element name must be unique within the HTML document. This parameter is disabled by default.
Locate by HTML tag Text No (Empty) HTMLTAG="tagName" If enabled, specifies that the start tag (or opening tag) identifying the target object will be searched.
Locate by attributes (case-sensitive, all must match) --- --- --- --- If enabled, allows attribute name/value pairs to be used as search criteria. Attributes provide additional information about HTML elements. If this option is enabled ,the parameters specified below become active. This parameter is disabled by default.
Attribute name Text No (Empty) HTMLATTRIBUTE NAME="foo" VALUE="bar" The name of the attribute to search for. Click Add to enter a new attribute name / value pair. To remove an existing name / value pair, highlight the proper row of data, and then click Remove.  
Attribute value Text No (Empty) HTMLATTRIBUTE NAME="foo" VALUE="bar" The name of the attribute to search for. Click Add to enter a new attribute name / value pair. To remove an existing name / value pair, highlight the proper row of data, and then click Remove.  
Locate by content (no recommended, slow) Text No (Empty) HTMLCONTENTS="contents" If enabled, specifies that any textual and graphical content between the start and end tags will be used as search criteria. This parameter is disabled by default.
NOTE: This search method is exceedingly slow. Use as a last resort if all other methods cannot be used.
Restrict to specific match Number No (Empty) USEMATCH="4" If enabled, specifies which occurrence to use if there are multiple matches. For example, if five text boxes match and this parameter is set to 4, it will apply the activity to the fourth text box. This parameter is disabled by default.

Interaction

Property Type Required Default Markup Description
Action Text (Options) Yes Check
  • CLICKACTIONMODE="1"
  • CLICKACTIONMODE="2"
  • CLICKACTIONMODE="3"
  • CLICKACTIONMODE="4"
Specifies the type of interaction to perform on the control. The available options are:
  • Check (default) - Selects the designated checkbox.
  • Uncheck - Clears the designated checkbox.
  • Toggle - Selects or clears the designated checkbox, based on its current state.
  • Check if - Uses a valid BASIC expression to select the designated checkbox if it is not selected.
  • Uncheck if - Uses a valid BASIC expression to clear the designated checkbox if it is checked.

Description

Error Causes

On Error

Additional notes

Using the Edge Browser with IE Mode enabled (Enable IE mode) in Automate Desktop: Known limitations and required updates and configurations

ClosedKnown limitations

The following are known limitations that can occur while using IE mode with the Edge browser in Automate Desktop:

  • IE mode can cause Edge to perform slower and behave differently than other available browsers. Some examples are slower execution times for tasks, or slower response times while using Automate Desktop's Window Dissection Technology () to select HTML elements.

  • Do not manually interact with Edge browser tabs outside of the task. Doing so can cause the task to fail.

  • When the Web Browser - Open activity runs in a task, or if a browser window is opened by another Web Browser activity (for example, using the Web Browser - Click activity to click an Open button), the web browser will first navigate to http://localhost:<random port number>/, and then navigate to the provided URL.

  • Configurable sites have limitations, based on the version of Windows currently running. See the Microsoft doc Learn about Configurable sites in IE mode for more information.

  • Microsoft Edge (with IE mode disabled), Chrome, and Firefox browsers load in Automate Desktop without predefined settings and a profile. However, if IE mode is enabled in the Edge browser, it will load the predefined settings of the default profile currently in use with the browser instead.

ClosedRequired updates and configurations

The following Microsoft Edge, Internet Explorer, and Windows updates and configurations are required to use IE mode in Automate Desktop:

  • Install the latest Windows updates (all supported versions of Windows):

    To ensure the Internet Explorer mode API version in the Edge browser has the latest updates, install the latest Windows updates available to you. After updating Windows, enter edge://compat/iediagnostic in the Edge browser's address bar and confirm the Attempt to launch Internet Explorer mode setting displays Success on the Internet Explorer mode diagnostic information page.

  • Prevent Internet Explorer from opening sites in Microsoft Edge (all supported versions of Windows):

    To ensure IE mode opens web pages in Edge correctly, do the following:

    1. Open Microsoft Edge.

    2. In the upper-right corner of the browser window, select the Settings and more icon , and then select Settings.

    3. From the navigation pane on the left, select Default browser.

    4. For the Let Internet Explorer open sites in Microsoft Edge, select the drop-down arrow, and then select Never.

  • Disable Protected Mode in Internet Explorer 7 (Windows Vista, Windows 7, and Windows 10):

    Disable the Enable Protected Mode setting for each security zone in Internet Explorer 7. To view and configure this setting for each security zone, do the following:

    1. Open Internet Explorer 7.

    2. Select Tools > Internet Options.

    3. Select the Security tab.

    4. Select the Internet zone.

    5. Clear the Enable Protected Mode (requires restarting Internet Explorer) checkbox if it is selected.

    6. Select the Local intranet zone.

    7. Clear the Enable Protected Mode (requires restarting Internet Explorer) checkbox if it is selected.

    8. Select the Trusted sites zone.

    9. Clear the Enable Protected Mode (requires restarting Internet Explorer) checkbox if it is selected.

    10. Select the Restricted sites zone.

    11. Clear the Enable Protected Mode (requires restarting Internet Explorer) checkbox if it is selected.

    12. When finished, select OK.

    13. Close and then restart Internet Explorer 7.

  • Disable Enhanced Protected Mode in Internet Explorer 10/Internet Explorer 11 (Windows Vista, Windows 7, and Windows 10):

    Disable the Enable Enhanced Protected Mode setting in Internet Explorer 10/Internet Explorer 11. To view and configure this setting, do the following:

    1. Open Internet Explorer 10/Internet Explorer 11.

    2. Select Tools > Internet Options.

    3. Select the Advanced tab.

    4. Scroll down to the Security section.

    5. Clear the Enable Enhanced Protected Mode checkbox if it is selected.

    6. Select OK.

    7. Close and then restart Internet Explorer 10/Internet Explorer 11.

  • Adjust display settings (Windows 10):

    Set the Change the size of text, apps, and other items to 100% in Windows 10. To view and configure this setting, do the following:

    1. In Windows 10, select Start > Settings > System > Display.

    2. Scroll down the Scale and layout section.

    3. Verify Change the size of text, apps, and other items is set to 100% (Recommended). If it is set to another size, click the drop-down arrow and then select 100% (Recommended).

    4. Close the Display settings.

  • Disable IE Enhanced Security Configuration setting (all supported versions of Windows Server):

    Disable (Off) the IE Enhanced Security Configuration setting in Windows Server. To view and configure this setting, do the following:

    1. In Windows Server, open the Server Manager.

    2. Select Local Server.

    3. If IE Enhanced Security Configuration is set to On, select it to configure it, and then proceed to step 4. If it is set to Off, no further configuration is required and you can close the Server Manager.

    4. On the Internet Explorer Enhanced Security Configuration dialog, set Administrators and Users to Off.

    5. Select OK.

Example

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Description

This sample task opens a web page, clears (unchecks) a checkbox, and then selects (checks) a different checkbox in an existing web browser session.

Copy
<AMWEBBROWSER URL="https://www.javatpoint.com/oprweb/test.jsp?filename=html-checkbox-tag" BROWSER="edge" SESSION="BrowserSession1" />
<AMWEBBROWSER ACTIVITY="check" PATH="/iframewrapper" HTMLID="Java" SESSION="BrowserSession1" CHECKACTIONMODE="1" />
<AMWEBBROWSER ACTIVITY="check" PATH="/iframewrapper" HTMLID="PHP" SESSION="BrowserSession1" CHECKACTIONMODE="0" />