nightwatchjs / nightwatch

Integrated end-to-end testing framework written in Node.js and using W3C Webdriver API. Developed at @browserstack
https://nightwatchjs.org
MIT License
11.75k stars 1.3k forks source link

Can't assert off find as documentation would suggest #4208

Closed reallymello closed 1 month ago

reallymello commented 1 month ago

Description of the bug/issue

When I view the documentation on https://nightwatchjs.org/guide/writing-tests/introduction.html it displays browser.element.find('selector').assert.valueEquals('text'); as a valid way of asserting the text of an element, but when I try to use it I am informed Property 'valueEquals' does not exist on type 'ElementAssertions'

image

Steps to reproduce

Try to use the included assertion examples on https://nightwatchjs.org/guide/writing-tests/introduction.html in a Nightwatch TypeScript project.

image

Sample test

browser.element.find('selector').assert.textEquals('text');

Command to run

n/a

Verbose Output

n/a

Nightwatch Configuration

n/a

Nightwatch.js Version

3.6.1

Node Version

No response

Browser

No response

Operating System

No response

Additional Information

No response

garg3133 commented 1 month ago

Fixed in https://github.com/nightwatchjs/nightwatch-docs/pull/303. Changes are now live.

Thank you for the issue.