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

Method _contextLocator

lib/helper/Playwright.js:2688–2700  ·  view source on GitHub ↗

* Grab Locator if called within Context * * @param {*} locator

(locator)

Source from the content-addressed store, hash-verified

2686 * @param {*} locator
2687 */
2688 _contextLocator(locator) {
2689 const locatorObj = new Locator(locator, 'css')
2690
2691 locator = buildLocatorString(locatorObj)
2692
2693 if (this.contextLocator) {
2694 const contextLocatorObj = new Locator(this.contextLocator, 'css')
2695 const contextLocator = buildLocatorString(contextLocatorObj)
2696 locator = `${contextLocator} >> ${locator}`
2697 }
2698
2699 return locator
2700 }
2701
2702 /**
2703 * {{> grabTextFrom }}

Callers 1

grabTextFromMethod · 0.95

Calls 1

buildLocatorStringFunction · 0.85

Tested by

no test coverage detected