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

Method getValue

lib/element/WebElement.js:123–134  ·  view source on GitHub ↗

* Get value of the element (for input elements) * @returns {Promise } Element value

()

Source from the content-addressed store, hash-verified

121 * @returns {Promise<string>} Element value
122 */
123 async getValue() {
124 switch (this.helperType) {
125 case 'playwright':
126 return this.element.inputValue()
127 case 'webdriver':
128 return this.element.getValue()
129 case 'puppeteer':
130 return this.element.evaluate(el => el.value)
131 default:
132 throw new Error(`Unsupported helper type: ${this.helperType}`)
133 }
134 }
135
136 /**
137 * Check if element is visible

Callers 6

matchStepFunction · 0.80
grabValueFromAllMethod · 0.80
waitForValueMethod · 0.80
proceedSingleFunction · 0.80
WebElement_test.jsFile · 0.80
els_test.jsFile · 0.80

Calls 1

evaluateMethod · 0.80

Tested by

no test coverage detected