Appearance
TEST.browser
TEST.browser is a read-only property that returns the browser the current test is running in.
This is useful if you need browser-specific handling, e.g. validating if the iOS app banner shows up for Safari browsers.
Usage
js
TEST.browserReturns
A string identifying the browser the test is running in:
chrome: for Google Chromefirefox: for Mozilla Firefoxedge: for legacy Microsoft Edge (EdgeHTML)edgechromium: for Chromium-based Microsoft Edgesafari: for Safariie11: for Internet Explorer 11
Examples
js
if (TEST.browser === "safari") {
I.see("#ios-app-install-banner")
} else {
I.dontSee("#ios-app-install-banner")
}In the example above, the test checks that the element #ios-app-install-banner is displayed only when running in Safari.