utils

utils.isChrome()

Type definition

function isChrome(config: SeleniumConfig): boolean;

Example usage

import {browser, test, utils} from 'cybernaut';

test('Example: utils.isChrome()', async (t, config) => {
  await t.perform(browser.loadPage('https://www.google.com/ncr'));

  if (utils.isChrome(config)) {
    // Write your browser-specific code here.
  }
});

Example output

Example: utils.isChrome()
  ✓ Perform: Load the page at https://www.google.com/ncr

utils.isFirefox()

Type definition

function isFirefox(config: SeleniumConfig): boolean;

Example usage

import {browser, test, utils} from 'cybernaut';

test('Example: utils.isFirefox()', async (t, config) => {
  await t.perform(browser.loadPage('https://www.google.com/ncr'));

  if (utils.isFirefox(config)) {
    // Write your browser-specific code here.
  }
});

Example output

Example: utils.isFirefox()
  ✓ Perform: Load the page at https://www.google.com/ncr

results matching ""

    No results matching ""