UNPKG

nightwatch

Version:

Easy to use Node.js based end-to-end testing solution for web applications using the W3C WebDriver API.

20 lines (19 loc) 599 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const { By, RelativeBy } = require('selenium-webdriver'); const Locator = require('./locator.js'); const AppiumLocator = require('./appium-locator.js'); class NightwatchLocator { /** * @param {object|string} element * @param {boolean} isAppiumClient * @return {By|RelativeBy} */ static create(element, isAppiumClient) { if (isAppiumClient) { return AppiumLocator.create(element); } return Locator.create(element); } } module.exports = NightwatchLocator;