* Check if the browser is controlled by Selenium. * Note: This only works within the geckodriver. * cf. http://stackoverflow.com/questions/33225947/can-a-website-detect-when-you-are-using-selenium-with-chromedriver * * @returns {boolean}
()
| 481 | * @returns {boolean} |
| 482 | */ |
| 483 | static isSeleniumBot() { |
| 484 | // noinspection JSUnresolvedVariable |
| 485 | return window.navigator.webdriver === true && this.browser().name === 'firefox'; // Should return false if executed under chromium/webdriver (both the geckodriver and the webdriver set window.navigator.webdriver to true) |
| 486 | } |
| 487 | |
| 488 | /** |
| 489 | * Return `true` if the given number is negative, or if the given string contains a negative sign : |