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

Method forBrowser

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

* Configures the target browser for clients created by this instance. * Any calls to #withCapabilities after this function will * overwrite these settings. * * You may also define the target browser using the SELENIUM_BROWSER * environment variable. If set, this enviro

(name, opt_version, opt_platform)

Source from the content-addressed store, hash-verified

371 * @return {!Builder} A self reference.
372 */
373 forBrowser(name, opt_version, opt_platform) {
374 this.capabilities_.setBrowserName(name)
375 if (opt_version) {
376 this.capabilities_.setBrowserVersion(opt_version)
377 }
378 if (opt_platform) {
379 this.capabilities_.setPlatform(opt_platform)
380 }
381 return this
382 }
383
384 /**
385 * Sets the proxy configuration for the target browser.

Callers 8

builderMethod · 0.95
headless.jsFile · 0.80
google_search.jsFile · 0.80
logging.jsFile · 0.80
chrome_android.jsFile · 0.80
GetBrowserForTestsFunction · 0.80
options_test.jsFile · 0.80

Calls 3

setBrowserNameMethod · 0.45
setBrowserVersionMethod · 0.45
setPlatformMethod · 0.45

Tested by

no test coverage detected