Skip to content

Waiting And Snapshots

The following wait actions are available:

  • WaitForContent
  • Wait

After executing a browser action that results in one or more requests to the web server, it is important to use one of the two wait actions. The default wait action to use is WaitForContent. Internally, this action tracks pending requests and page loads and will complete when the page is ready to execute the next action. On some pages, WaitForContent does not work perfectly. Usually, if the workflow engine is unable to detect a progress indicator or there are tricky frame interactions, the WaitForContent could finish before it should.

If this happens, you can use the Wait action. Wait has a required property called "DelayMilliseconds". Sometimes it may make sense to simply wait for a fixed amount of time. This could have a performance impact if the wait is longer than it needs to be. In this situation there are two matching rules within the Wait action to match on a condition, "HtmlRule" and "SnapshotRule". Additionally you can use the "WaitForAll" or "WaitWhileAny" properties to match on UI text elements on the page. "WaitForAll" will wait until all text elements appear on the page. "WaitWhileAny" will wait while any text elements appear on the page. In general, you will employ a significantly higher "DelayMilliseconds" than is necessary and rely upon the rules to match on something in the page to figure out when the page is finished loading.

It is highly recommended to take a snapshot after any action that can change the page.

Snapshotting is a crucial mechanism to provide the right information to Venari's analysis modules. Snapshots have the same matching rules as the Wait action. See Matching Rules for more detailed information.