---
Help: Example tests using Selenium via BrowserTest fixture.
Suite
---
﻿!-BrowserTest-! defines a language (a DSL of sorts) to interact with a website via a browser. Normally a [[heuristic][>FindingByHeuristics]] is used to find elements using end-user terms, leading to readable wiki pages describing tests, robust to technical changes in the site's HTML. But this heuristic may be bypassed in favor of [[technical selectors][>TechnicalSelectors]] to specify which element is meant. Furthermore !-BrowserTest-! retries finding elements (for a configurable time) if it cannot locate the immediately. This allows tests of dynamic web pages (where the page content is updated asynchronous using !-JavaScript-!) or using browsers where Selenium is not always able to determine whether a page load is complete (e.g. Safari).

The language supported by !-BrowserTest-! is defined by its public methods, which can be used in combination with Slim's standard script verbs (e.g. check, ensure, reject, show).
!-BrowserTest-!'s language will suffice for many tests, but can be extended by creating a custom subclass.
A specific subclass (!-NgBrowserTest-!) is included to test [[!-AngularJs-!][https://angularjs.org]] sites. This class has functionality to find elements based on ‘models’, ‘bindings’ and ‘repeaters’ (borrowed from [[Protractor][http://angular.github.io/protractor/]]).

The tests in this suite show example usage of this fixture:
>ScriptTest shows the basic functionality of !-BrowserTest-! to test websites.
>ScenarioTest takes this to the next level by using a parameterized script (i.e. scenario).
The >TableTemplateTest simplifies the parameterization of the script.
>CustomFixtureTest shows the usage of a custom subclass of !-BrowserTest-! to make test content more descriptive by encapsulating knowledge of the site's HTML in Java code.
>StoryboardTest shows a test where a screenshot is taken after each action. This is then combined with a scenario in >TemplateStoryboardTest.
>ResizeTest shows some manipulation of the browser window.
>LayoutTest shows how the layout of a page can be checked, using [[Galen Framework][http://galenframework.com]] specs.
>MapTest shows how maps could be automated by methods of clicking, right clicking, double clicking, draging with offsets.
>AngularJsCalculatorTest test an [[!-AngularJs-!][https://angularjs.org]] application using !-NgBrowserTest-! to select elements by model, binding and repeater.
>Angular2CalculatorTest tests an [[Angular][https://angular.io]] application using !-Ng2BrowserTest-!.
>AngularUiSelectTest show a test interacting with [[!-AngularJs-! ui-select][https://github.com/angular-ui/ui-select]].
>HeuristicVsTechnicalSelectors contains a single test in two versions: using the heuristics and using technical selectors to give some more understanding of the difference between the two.
>UseCookiesForHttpTest shows cookies created using !-BrowserTest-! scripts can be supplied to [[!-HttpTest-!][.HsacExamples.SlimTests.HttpTests]] (and its children). This can, for instance, be used to forward login cookies to REST tests.

The Selenium configuration (e.g. what browser on what platform) to use is normally defined in a >SuiteSetUp page, but its contents can be overridden by using system properties.
This allows different configurations on the build server to test with different browsers, without requiring different wiki content, but only requiring a different build configuration. More details can be found in >OverridingSeleniumSetup.

!2 Language

!3 !-BrowserTest-!

The main commands/keywords (i.e. public methods) offered by !-nl.hsac.fitnesse.fixture.slim.web.BrowserTest-! are listed below.
The [[heuristic to find places][>FindingByHeuristics]] tries a number of translations of end user terms to Selenium 'find' commands (e.g. is a full or partial label given, a link's or button's text, a placeholder). The first find that results in an element on the page is used by !-BrowserTest-!.

-|Comment                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|'''Command'''                                                                  |'''Description'''                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|open <url>                                                                     |opens the specified URL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|click <place>                                                                  |performs mouse click at the designated place (e.g. link/button/checkbox/radio button)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|click <technical selector> above/below/left of/right of/near <place>           |like click <place>, but find the element based on another element's location                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|click <place> at offset X <horizontalOffset> Y <verticalOffset>                |performs mouse click at offset from center of the designated place (e.g. link/button/checkbox/radio button)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|click if available <place>                                                     |performs mouse click at the designated place (e.g. link/button/checkbox/radio button). Does not throw an exception on timeout but returns !style_code[false], so can be used with script table's 'reject' verb to check something cannot be clicked.                                                                                                                                                                                                                                                                                                                                                   |
|double click <place>                                                           |performs mouse double click at the designated place (e.g. link/button/checkbox/radio button)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|double click <place> at offset X <horizontalOffset> Y <verticalOffset>         |performs mouse double click at offset from center of the designated place (e.g. link/button/checkbox/radio button)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|right click <place>                                                            |performs right mouse button click (a.k.a. context click) at the designated place (e.g. link/button/checkbox/radio button)                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|right click <place> at offset X <horizontalOffset> Y <verticalOffset>          |performs mouse right click at offset from center of the designated place (e.g. link/button/checkbox/radio button)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|shift click <place>                                                            |performs mouse click while holding shift key at the designated place (e.g. link/button/checkbox/radio button)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|control click <place>                                                          |performs mouse click while holding control key at the designated place (e.g. link/button/checkbox/radio button). If 'send command for control on Mac' is enabled 'Cmd' (i.e. command) key will be pressed instead of 'Ctrl' (i.e. control).                                                                                                                                                                                                                                                                                                                                                            |
|enter <value> as <input>                                                       |clears the current value of an input and types the value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|enter <value> as <technical selector> above/below/left of/right of/near <place>|like enter <value> as <place>, but find the element based on another element's location                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|enter <value> for <input>                                                      |types the value, appending to the current value of the input                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|select <value> as <input>                                                      |selects a value in the drop down box (or radio button), clearing before selecting the value in case of a multi-selectbox.                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|select <value> for <input>                                                     |selects a value in the drop down box (or radio button), appending to the selection in case of a multi-selectbox.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|enter date <value> as <place>                                                  |replaces the current value of an input of type 'date' (i.e. using the HTML5 datepicker) with the supplied value. The value must be in the format yyyy-mm-dd.                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|available options for <input>                                                  |retrieves all possible values for the drop down box                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|normalized available options for <input>                                       |retrieves all possible normalized values for the drop down box. Normalized means all sequences of whitespace are collapsed to a single space.                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|type <text>                                                                    |enters the supplied text in the currently active element                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|press <key>                                                                    |sends press of a [[key][http://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/Keys.html#enum.constant.summary]] (e.g. Tab, Enter, Escape, Space, M) to browser                                                                                                                                                                                                                                                                                                                                                                                                                        |
|clear <input>                                                                  |removes the content in the input                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|take screenshot <name>                                                         |stores the current browser's content as <name><unique>.png (used in combination with 'show' verb)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|take screenshot <name> of <place>                                              |takes a screenshot and crops it to the designated place, effectively screenshotting only the given element                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
|page source                                                                    |gets the current browser's content (used in combination with 'show' verb, the html is escaped and added to the wiki table)                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
|save page source                                                               |stores the current browser's content as .html file (used in combination with 'show' verb, a link to the created file is added to the wiki table)                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|value of <input>                                                               |retrieves the current value of the input (for use with 'check' verb or variable assignment)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|value of <technical selector> above/below/left of/right of/near <place>        |like value of <place>, but find the element based on another element's location                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|normalized value of <input>                                                    |retrieves the normalized current value of the input (for use with 'check' verb or variable assignment). Normalized means all sequences of whitespace are collapsed to a single space.                                                                                                                                                                                                                                                                                                                                                                                                                  |
|values of <place>                                                              |retrieves all values of place, which is expected to be a 'select' or list                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|normalized values of <place>                                                   |retrieves all normalized values of place, which is expected to be a 'select' or list. Normalized means all sequences of whitespace are collapsed to a single space.                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|number for <list item text>                                                    |retrieves the number of the item (in a numbered list) with the supplied text                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|page title                                                                     |retrieves the current page's title (for use with 'check' verb)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|is (not) visible <place> (in <container>)                                      |whether specified place is or becomes (not) visible in browser's window (used in combination with 'ensure').                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|is (not) visible on page <place> (in <container>)                              |whether specified place is or becomes (not) visible on the page, scrolling may be required to actually show it (used in combination with 'ensure').                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|number of times <text> is visible                                              |how often specified text is visible in browser's window                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|number of times <text> is visible on page                                      |how often specified text is visible on the page in the browser's window, scrolling may be required to actually show it                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|is enabled <place>                                                             |whether specified place is enabled (i.e. can be clicked) (used in combination with 'ensure' and 'reject')                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|is disabled <place>                                                            |whether specified place is disabled (i.e. cannot be clicked) (used in combination with 'ensure' and 'reject')                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|scroll elements to center of viewport <true/false>                             |set the scroll behaviour to center elements to be scrolled to (true) or 'auto' (false/default)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|scroll elements to center of viewport                                          |returns the current setting for scroll behaviour. True for center, false for 'auto' (default).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|scroll to <place>                                                              |scrolls the designated place into view                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|hover over <place>                                                             |simulates hovering over the designated place with the mouse (so e.g. 'mouseover' behavior can be tested)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|drag and drop <place> to <target>                                              |drags the designated place to the target (also works for HTML5 drag and drop if the source element has the !style_code[draggable] attribute)                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|drag and drop <element> to offset X <horizontalOffset> Y <verticalOffset>      |drags the designated element to the target offset from current location                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|html5 drag and drop <place> to <target>                                        |drags the designated (html5 draggable) place to the target, forcing the html5 drag and drop javascript (works for all HTML5 drag and drop functionality (including images, links, etc, but does not support all jquery or other framework variations)                                                                                                                                                                                                                                                                                                                                                  |
|set drag distance <diagonalOffset>                                             |adds value for element to be moved a little before actual dragging. Can by used by [[react elements][https://github.com/clauderic/react-sortable-hoc]] with limitation of "distance".                                                                                                                                                                                                                                                                                                                                                                                                                  |
|set drag delay <milliseconds>                                                  |adds pause after clicking on element before actual dragging. Can be used by [[react elements][https://github.com/clauderic/react-sortable-hoc]] with limitation of "pressDelay".                                                                                                                                                                                                                                                                                                                                                                                                                       |
|clear drag setup                                                               |clears drag setup of delay and distance                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|wait for page title <title>                                                    |waits until a page with the specified title is shown                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
|wait for visible <place>                                                       |waits until the specified place (i.e. element) is visible in the browser                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|seconds before page load timeout <value>                                       |sets how many seconds to wait for the browser to load the next page after a request before an exception is thrown                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|seconds before page load timeout                                               |retrieves how many seconds is waited when loading a new page before an exception is thrown                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
|seconds before timeout <value>                                                 |sets how many seconds to wait on the browser before an exception is thrown                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
|seconds before timeout                                                         |retrieves how many seconds is waited before an exception is thrown                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|wait <seconds> (milli)seconds                                                  |waits the specified number of (milli)seconds (e.g. for an animation to complete)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|location                                                                       |returns the current web address (i.e. URL of page)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|back                                                                           |goes back 1 page in the browser's history (i.e. clicks browser's back button)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|forward                                                                        |goes forward 1 page in the browser's history (i.e. clicks browser's forward button)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|refresh                                                                        |refreshes the current page (i.e. clicks the brower's refresh button)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
|alert text                                                                     |retrieves the text of the open !-JavaScript-! alert.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
|confirm alert                                                                  |confirms the open !-JavaScript-! alert.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|dismiss alert                                                                  |dismisses the open !-JavaScript-! alert.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|select all                                                                     |Selects the entire content of the currently active element.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|copy                                                                           |Copies the current selection to the browser's system clipboard.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|cut                                                                            |Copies the current selection to the browser's system clipboard and removes that selection.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
|paste                                                                          |Pastes the current browser's system clipboard content to the currently active element.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|get selection text                                                             |Gets the text currently selected.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|delete all cookies                                                             |deletes all cookies(for the domain of the current open page in the browser)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|clear local storage                                                            |clears HTML5's localStorage (for the domain of the current open page in the browser)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
|clear session storage                                                          |clears HTML5's sessionStorage (for the domain of the current open page in the browser)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|open in new tab <url>                                                          |opens the specified URL in a new tab, and switches to that tab                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|switch to next tab                                                             |Switches the browser's window to the next tab                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|switch to previous tab                                                         |Switches the browser's window to the previous tab                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|close tab                                                                      |Closes the current tab and switches the browser's window back to the previous one, if the browser has multiple tabs                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|tab count                                                                      |How many tabs are open in the browser currently?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|current tab index                                                              |Which tab is currently displayed in the browser's window?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|use aria table structure <true/false>                                          |If set to true, all methods to search table will assume aria table design pattern instead of <table> tags (see: https://www.w3.org/TR/wai-aria-practices/examples/table/table.html) Default:false                                                                                                                                                                                                                                                                                                                                                                                                      |
|value of column number <columnIndex> in row number <rowIndex>                  |retrieves the value from column number 'columnIndex' in row number 'rowIndex'                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|value of <columnName> in row number <rowIndex>                                 |retrieves the value from the column with header 'columnName' in row number 'rowIndex'                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|value of <columnName> in row where <selectColumn> is <selectValue>             |finds the first row where the column with header 'selectColumn' is 'selectValue' and retrieves the value from the column with header 'columnName'                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|row exists where <selectColumn> is <selectValue>                               |determines whether there is a row where the column with header 'selectColumn' is 'selectValue'                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|click <place> in row number <rowIndex>                                         |clicks the button or link whose text matches 'place' in row number 'rowIndex'                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|click <place> in row where <selectColumn> is <selectValue>                     |finds the first row where the column with header 'selectColumn' is 'selectValue' and clicks the button or link whose text matches 'place'                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|enter <value> as <columnName> in row where <selectColumn> is <selectValue>     |finds the first row where the column with header 'selectColumn' is 'selectValue' and enters 'value' in the column with header 'columnName'                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
|download <link>                                                                |Downloads the target of the link (to the wiki's files section).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|download content from <url>                                                    |Downloads the file at the specified url (to the wiki's files section).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|select file <file>                                                             |Selects the supplied file using the first file input on the page. The file may be in the wiki's files section, or on the local file system.                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|select file <file> for <file input>                                            |Selects the supplied file using the indicated input. The file may be in the wiki's files section, or on the local file system.                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|download <place> from row number <rowIndex>                                    |Downloads the target of the link in column 'place', or with text 'place', in row number 'rowIndex'.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|download <place> from row where <selectColumn> is <selectValue>                |Finds the first row where the column with header 'selectColumn' is 'selectValue' and downloads the target of the link in column 'place', or with text 'place'.                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|target of link <link>                                                          |Retrieves the destination of the link (i.e. the address or URL).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|tooltip for <place>                                                            |Retrieves the value of the tooltip that is shown when the mouse is placed on the place (the 'title' attribute)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|current browser width                                                          |Retrieves the current width of the browser's window (in pixels).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|set browser width <newWidth>                                                   |Sets the width of the browser's window to 'newWidth' (in pixels).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|current browser height                                                         |Retrieves the current height of the browser's window (in pixels).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|set browser height <newHeight>                                                 |Sets the height of the browser's window to 'newHeight' (in pixels).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|set browser size to <newWidth> by <newHeight>                                  |Sets the size of the browser's window to 'newWidth' by 'newHeight' (in pixels).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|set browser size to maximum                                                    |Maximizes the size of the browser's window.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|refresh until <place> is visible on page                                       |Refreshes current page until 'place' is found somewhere on the page. Do not forget to set 'repeat at most times', or else the loop may run endlessly!                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|refresh until <place> is not visible on page                                   |Refreshes current page until 'place' is not found somewhere on the page. Do not forget to set 'repeat at most times', or else the loop may run endlessly!                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|refresh until value of <place> is not <currentValue>                           |Refreshes current page until value of 'place' is no longer 'currentValue'. When 'place' cannot be found, or still has value 'currentValue' this method will return 'false'. Do not forget to set 'repeat at most times', or else the loop may run endlessly!                                                                                                                                                                                                                                                                                                                                           |
|refresh until value of <place> is <expectedValue>                              |Refreshes current page until value of 'place' is 'expectedValue'. When 'place' cannot be found, or does not have value 'expectedValue' this method will return 'false'. Do not forget to set 'repeat at most times', or else the loop may run endlessly!                                                                                                                                                                                                                                                                                                                                               |
|click <clickPlace> until value of <checkPlace> is not <currentValue>           |Clicks 'clickPlace' until value of 'checkPlace' is no longer 'currentValue'.  When 'checkPlace' cannot be found, or still has value 'currentValue' this method will return 'false'. (Test will be stopped if 'clickPlace' cannot be found.)                                                                                                                                                                                                                                                                                                                                                            |
|click <clickPlace> until value of <checkPlace> is <expectedValue>              |Clicks 'clickPlace' until value of 'checkPlace' is 'expectedValue'. When 'checkPlace' cannot be found, or does not have value 'expectedValue' this method will return 'false'. (Test will be stopped if 'clickPlace' cannot be found.)                                                                                                                                                                                                                                                                                                                                                                 |
|execute javascript <!-JavaScript-!> until <checkPlace> is <expectedValue>      |Executes !-'JavaScript'-! until value of 'checkPlace' is 'expectedValue', or until the maximum number of retries has been reached. Do not forget to set 'repeat at most times', or else the loop may run endlessly!                                                                                                                                                                                                                                                                                                                                                                                    |
|execute javascript <!-JavaScript-!> until <checkPlace> is <expectedValue>      |Executes !-'JavaScript'-! until value of 'checkPlace' is no longer 'expectedValue', or until the maximum number of retries has been reached. Do not forget to set 'repeat at most times', or else the loop may run endlessly!                                                                                                                                                                                                                                                                                                                                                                          |
|repeat count                                                                   |Returns the number of requests sent by the last 'repeat until ...' command.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|time spent repeating                                                           |Returns the number of milliseconds the last 'repeat until ...' command took.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|repeat at most	<count> times                                                   |Sets the maximum number of requests sent by 'repeat until ...' commands. The commands will return false if this number is reached without the condition being met.                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|repeat at most	times                                                           |Returns the maximum number of requests sent by 'repeat until ...' commands.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|set repeat interval to <interval> milliseconds                                 |Sets the number of milliseconds between requests sent by 'repeat until ...' commands.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|repeat interval                                                                |Returns the number of milliseconds between requests sent by 'repeat until ...' commands.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|value of attribute <attribute> on <place>                                      |retrieves the value of the given attribute on the element identified by place                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|value of attribute <attribute> on <place> in <container>                       |retrieves the value of the given attribute on the element identified by place inside the given container                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|set search context to <container>                                              |Limits searches for 'places' by other keywords/commands to inside 'container' (i.e. the child-elements inside the container element), instead of the whole page. This is useful in case the same 'place' occurs multiple times on the same page, to ensure which one is found. All subsequent searches are limited to 'container' until either 'clear search context', 'open', 'back', 'forward', 'refresh' or one of the frame or tab manipulation commands is given. Many commands also offer an 'in <container>' version (e.g. 'click <place> in <container>') to limit searching only for that row.|
|clear search context                                                           |Removes any search limits previously set by 'set search context to <container>' (i.e. subesquent searches will search the entire page).                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|set implicit wait for angular to <true/false>                                  |Controls whether !-BrowserTest-! should determine whether the site being tested uses !-AngularJs-! and if so, wait for Angular to finish rendering the page (default is 'false').                                                                                                                                                                                                                                                                                                                                                                                                                      |
|switch to default content                                                      |Activates main/top-level (i)frame (i.e. makes it the current frame).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
|switch to frame <technical selector>                                           |Activates child frame of current (i)frame found using 'technical selector'.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|switch to parent frame                                                         |Activates parent frame of current (i)frame. Does nothing if when current frame is the main/top-level one.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|set implicit find in frames to <true/false>                                    |Controls whether !-BrowserTest-! should look for elements inside nested (i)frames if they cannot be found in the current frame (default is 'true').                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|set send command for control on Mac to <true/false>                            |Controls whether !-BrowserTest-! should press 'Cmd' (i.e. command) key instead of 'Ctrl' (i.e. control) when brower is running on Mac. By default this is false.                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|send command for control on Mac                                                |Returns whether !-BrowserTest-! should press 'Cmd' (i.e. command) key instead of 'Ctrl' (i.e. control) when brower is running on Mac.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|set username <user> and password <password> for hostname <host>                |Sets a default username and password for a given domain (hostname) to automatically authenticate against a basic or digest auth challenge                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|enable shadowroot containers <true/false>                                      |if set to true, any method used with "in <container>" will look in the shadow DOM if the container element has a shadow root                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

!3 !-NgBrowserTest-!

!-nl.hsac.fitnesse.fixture.slim.web.NgBrowserTest-! ensures !-AngularJs-! is finished processing the page before trying to find elements or interact with them. Furthermore it adds finding elements by based on Angular bindings and models to the heuristic. Finally it adds some commands/keywords to !-BrowserTest's-!, the main ones are listed below.

-|Comment                                                                                                                                                                                                                                                                                     |
|number of <repeater>                                                            |Counts the number of elements created by the 'repeater' (e.g. 'cat in cats').                                                                                                                               |
|value of <columnName> in row where <selectColumn> is <selectValue> of <repeater>|Retrieves the value of the column with the 'columnName' header in the first row where the column with header 'selectColumn' is 'selectValue' of a table generated by 'repeater'.                            |
|value of <columnName> in row number <rowIndex> of <repeater>                    |Retrieves the value of the column with the specified header in the specified row of a table generated by 'repeater'.                                                                                        |
|value of column number <columnIndex> in row number <rowIndex> of <repeater>     |Retrieves the value of the specified column and row of a table generated by 'repeater'.                                                                                                                     |
|wait for Angular requests to finish                                             |Explicitly wait for Angular to finish rendering the page (should not be needed normally, as the other commands ensure this is done, unless 'set implicit wait for angular to' has been called with 'false').|
|set Angular root <selector>                                                     |Defines the CSS selector to find the root element containing the Angular application.                                                                                                                       |

!3 !-Ng2BrowserTest-!

!-nl.hsac.fitnesse.fixture.slim.web.Ng2BrowserTest-! ensures Angular 2+ is finished processing the page before trying to find elements or interact with them. Currently finding elements based on Angular bindings and models is not supported, nor are ther repeater commands from NgBrowserTest. Finally it adds some commands/keywords to !-BrowserTest's-!, the main ones are listed below.

-|Comment                                                                                                                                                                                                                                        |
|wait for Angular requests to finish|Explicitly wait for Angular to finish rendering the page (should not be needed normally, as the other commands ensure this is done, unless 'set implicit wait for angular to' has been called with 'false').|
|set Angular root <selector>        |Defines the CSS selector to find the root element containing the Angular application. If not set, all Angular applications will be found automatically.                                                     |