Wait for Content
Wait for Content commands can be used to wait for web content to appear on a web page, or to wait for a specific URL to complete loading. When a Wait for Content command is configured to wait for web content, a web element must be selected in the web browser, and the Wait for Content command's parent action command will wait until that web element is available on the web page.
Example
The screenshot below shows the simplest example where the Wait for Content command can be used.
A Wait for Content command must be a direct sub-command of an action command and will work in conjunction with the action command. When an action command contains multiple Wait for Content sub-commands, the action command will wait until a condition specified by any of these commands is satisfied.
A Wait for Content command cannot be a sub-command of an HTML List command or an HTML Area command unless the HTML area is broken by the Wait for Content command's parent action command. An action command breaks an HTML area by default, so this limitation is rarely relevant.
Wait for Web Content
When a Wait for Content command is configured to wait for web content, a web element must be selected in the web browser, and the Wait for Content command's parent action command will wait until that web element is available on the web page. The Wait for Content option can be one of the following values:
None. The parent action command will not wait for content to appear, but will complete as soon as the content appear. Other wait timeout options, such as Wait for AJAX to complete, still determines how long the action command will wait if the content does not appear.
Optional. The parent action command will wait for content to appear, disregarding most other wait timeout options, except for Wait for full page load and Wait for first activity timeout values. The parent action command will not fail if the content does not appear within the Wait for content timeout.
Required. The parent action command will wait for content to appear, disregarding most other wait timeout options, except for Wait for full page load and Wait for first activity timeout values. The parent action command will fail if the content does not appear within the Wait for content timeout.
The web selection for Wait for Content commands works differently than for other commands that require a web selection. The selection XPaths specified by a Wait for Content command are used directly in a web page while it's loading before the page is parsed by Sequentum Enterprise, so the XPaths cannot use extended Sequentum Enterprise syntax, but must follow strict XPath 1.0 syntax. Note that strict XPath 1.0 is case sensitive while Sequentum Enterprise XPath is case insensitive. Furthermore, because the XPaths are used before Sequentum Enterprise has parsed the web page, the XPaths cannot work across frames, and the frame or iframe node names are therefore not valid in these XPaths. Sequentum Enterprise will use the XPaths to search for the web content in all available frames and iframes.
Multiple Wait for Web Content commands or a single command with multiple selection XPaths can be used to cover different scenarios. For example, if an action command must wait for a search result to appear on the web page, but sometimes the search result is empty and a message is displayed instead of the search result, then one selection XPath can be used to select the search result, and another XPath used to select the message that appears when the search result is empty. This means the command will not wait around for the search result to appear on the page if the search result is empty, but instead stop waiting as soon as the empty search message appears on the page.
Wait for URL
When a Wait for Content command is configured to wait for a URL, a regular expression must be specified, and the Wait for Content command's parent action command will wait for a URL that matches that regular expression. Sequentum Enterprise will check the URL of all frames and all web requests that load content asynchronously.
Shared Action Options
The parent action command of one or more Wait for Content commands specifies how long the action command should Wait for content and if the content is optional or required. For convenience, you can change these action options while editing a Wait for Content command. When you change these options for one Wait for Content command, the options will automatically change for all Wait for Content commands with the same parent action command. You can also configure these options directly on the parent action command.
Command Properties
Command
Command Description: A custom description for the command.Default value is Empty.
Command Transformation Script: A script used to change command properties at run time. The default value is disabled.
Disabled: This property set to True allows user to disable the command. A disabled command will be ignored. The default value is set to False.
ID: This property indicates the internal unique ID of the command and is always auto- generated e.g. 58c8e4ac-e4c0-48f7-a63d-77064945380b.
Increase Data Count: This property indicates the data count every time this command is processed. The default value is set to False. Set it to TRUE if you want to get the count of the number of times a specific command is executed to get the data. The data count value is increased during data extraction, so it is used to measure agent progress and basis this increased data count, the agent decides the success criteria.
Name: This property specifies the name of the command.
Notify On Critical Error: A notification email is sent at the end of an agent run if the command encounters a critical error, and the agent has been configured to notify on critical errors. Critical errors include page load errors and missing required web selections. Default value is set to False.
Debug
Debug BreakPoint: Debugging will break at this command if the break point is set.Default value is set to False.
Debug Disabled: A disabled command will be ignored during debugging. Default value is set to False.
Debug Error Option: This property specifies what action to take when an error occurs in the debugger. Default value is set to Notify which indicates that when an error occurs at debugging time , then it will be notified. If we want to ignore the error at debug time , then we need to set this property value as Ignore.
Export
Export Enabled: A command with Export Enabled set to false will not save any data to data output. Default value is set to True indicates that data will be output.
Web Selection
Selection: The selection XPaths of the web elements associated with this command.
Paths: List of selection XPaths.
Path: The selection XPath.
Select Hidden Elements: Selects visible and disabled elements when true. Otherwise selects only visible and enabled web elements.
Selection Missing Option: Specifies what happens if this selection does not exist in the current page.
Default: Specifies if this selection does not exist in the current page then logs error.
Ignore Command but Execute Sub-Commands: Specifies if this selection does not exist in the current page then it ignores the current command , but executes sub-commands of the command.
Ignore Command: Specifies if this selection does not exist in the current page then it ignores the current command as well as sub-commands.
Log Error and Ignore Command: Specifies if this selection does not exist in the current page then it ignores the current command as well as sub-commands and logs an error message.
Log Warning and Ignore Command: Specifies if this selection does not exist in the current page then it ignores the current command as well as sub-commands and logs a warning message. Note: Warning message will be logged if , Log level is set to either ‘Low’ or ‘High’.
Log PageLoad Error and Ignore Command: Specifies if this selection does not exist in the current page then it ignores the current command as well as sub-commands and logs a Page Load error.
Wait for Content
Wait Type: Specifies if the command should wait for content on a web page to appear, or if it should wait for a URL to load. Default value is ‘Wait for web content’.
Wait URL Regex: When "Wait Type" is set to "Wait for URL", the command waits for a URL matching this regular expression.