MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / checkOptions

Function checkOptions

javascript/selenium-webdriver/index.js:756–766  ·  view source on GitHub ↗

* In the 3.x releases, the various browser option classes * (e.g. firefox.Options) had to be manually set as an option using the * Capabilities class: * * let ffo = new firefox.Options(); * // Configure firefox options... * * let caps = new Capabilities(); * caps.set('moz:fir

(caps, key, optionType, setMethod)

Source from the content-addressed store, hash-verified

754 * @throws {error.InvalidArgumentError}
755 */
756function checkOptions(caps, key, optionType, setMethod) {
757 let val = caps.get(key)
758 if (val instanceof optionType) {
759 throw new error.InvalidArgumentError(
760 'Options class extends Capabilities and should not be set as key ' +
761 `"${key}"; set browser-specific options with ` +
762 `Builder.${setMethod}(). For more information, see the ` +
763 'documentation attached to the function that threw this error',
764 )
765 }
766}
767
768// PUBLIC API
769

Callers 1

buildMethod · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected