MCPcopy
hub / github.com/blitz-js/blitz / elementByCss

Method elementByCss

integration-tests/utils/wd-chain.ts:19–31  ·  view source on GitHub ↗
(sel)

Source from the content-addressed store, hash-verified

17 }
18
19 elementByCss(sel) {
20 return this.updateChain(() =>
21 this.browser.findElement(By.css(sel)).then((el) => {
22 el.sel = sel
23 el.text = () => el.getText()
24 el.getComputedCss = (prop) => el.getCssValue(prop)
25 el.type = (text) => el.sendKeys(text)
26 el.getValue = () =>
27 this.browser.executeScript(`return document.querySelector('${sel}').value`)
28 return el
29 }),
30 )
31 }
32
33 elementByXpath(sel) {
34 return this.updateChain(() => {

Callers 8

elementByIdMethod · 0.95
runTestsFunction · 0.45
runTestsFunction · 0.45
runTestsFunction · 0.45
runTestsFunction · 0.45
getDataFunction · 0.45
runTestsFunction · 0.45
runTestsFunction · 0.45

Calls 1

updateChainMethod · 0.95

Tested by 7

runTestsFunction · 0.36
runTestsFunction · 0.36
runTestsFunction · 0.36
runTestsFunction · 0.36
getDataFunction · 0.36
runTestsFunction · 0.36
runTestsFunction · 0.36