MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / switchTo

Method switchTo

lib/helper/WebDriver.js:2781–2791  ·  view source on GitHub ↗

* {{> switchTo }}

(locator)

Source from the content-addressed store, hash-verified

2779 * {{> switchTo }}
2780 */
2781 async switchTo(locator) {
2782 this.browser.isInsideFrame = true
2783 if (!locator) {
2784 return this.browser.switchFrame(null)
2785 }
2786
2787 let res = await this._locate(locator, true)
2788 assertElementExists(res, locator)
2789 res = usingFirstElement(res)
2790 return this.browser.switchFrame(res)
2791 }
2792
2793 /**
2794 * {{> switchToNextTab }}

Callers 2

_withinBeginMethod · 0.95
_withinEndMethod · 0.95

Calls 3

_locateMethod · 0.95
usingFirstElementFunction · 0.85
assertElementExistsFunction · 0.70

Tested by

no test coverage detected