Every line of 'tohavetextcontent' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
526 function isTextContentEqual(elementOrSelector, expectedText, message, root) { 527 const host = getNode(elementOrSelector, root); 528 const actualText = host && getVisibleText((void 0), host, true); 529 if (actualText !== expectedText) { 530 innerFail({ 531 actual: actualText, 532 expected: expectedText, 533 message, 534 operator: '==', 535 stackStartFn: isTextContentEqual 536 }); 537 } 538 }
62 async isInnerTextEqualTo(text: string): Promise { 63 return (await this.innerText) === text; 64 }