LiquidTest provides a powerful assertion framework to add “checks” for specific content on pages. The Assertions are possibly the most important element of a LiquidTest test case. LiquidTest does not automatically add assertions to content. LiquidTest lets you identify the important content on pages and mark the content you wish to be asserted (checked) when the test case replays. The reason LiquidTest does not add random assertions is to make the test case less sensitive to changes in page layout or changes to unimportant content. This makes LiquidTest test cases robust and maintainable. That said, if you want to check all the content on the page, LiquidTest supports that also! You just need to let LiquidTest know when you are recording..
During a Record session, navigate to the target page. When on the target page, click the
Lockdown and Inspect button. This puts the LiquidTest browser into a safe state for inspecting the document internals and adding Assertions.
See below for the target page in
Lockdown state (notice the text on the button changes when in lockdown):
Now that the target page is in
Lockdown, we can add an assertion to an element on the page. To add an Assertion simply Right-click on the element that you wish to add an Assertion to and select
It is best to Left-Click on items in the target page when in lockdown. Left-clicking draws a border around the content/node(s)/element(s) and selects it in the DOM Inspector
. This one way to ensure that you Assert the intended target content/element(s)/node(s).
LiquidTest has a convenient
Assertion History pane that shows all Assertions added during a record session. The
Assertion History pane also provides a way to remove assertions that were accidentally added.
LiquidTest utilizes XPaths
) to locate elements on a page. We believe that XPaths
provide for the most robust and maintainable addressing of elements. If you would like to read more about LiquidTests addressing strategy please visit our XPath page
LiquidTest provides an information panel that shows all the Assertions that have been added to the current page. This panel also allows for the removal of Assertions that were previously added.
If you have specific DOM Node level (HTML Elements) content that you wish to Assert, LiquidTest provides an
Assertions Control Set to allow this. The advanced Assertion controls are located on the DOM Inspector panel.
To use the
Assertions Control Set simply select the Node within the DOM Inspector and then either Assert
Node and Children or
If you have written a script by hand or have worked out an XPath to a specific element that you wish to Assert or test for, you can use the LiquidTest DOM Inspectors
XPath Locator to verify the XPath.
Assertions really go hand-in-hand with the LiquidTest DOM Inspector. Make use of it!
News / Events
Recently Added Content