Priyansh Garg
Priyansh Garg
Actually asserts do return a value. Like if `browser.assert.title()` is called, value of `browser.title()` (that is, the command executed as part of performing assert) is returned back.
Okay, this was due to a silly mistake 😅 We need to add `ts-node` as part of `dependencies` and not `devDependencies`.
Also, you'd need to add a `tsconfig.json` file in `nightwatch` dir which will be used by `ts-node` while running the ts test file. But I wonder if we can use...
Regarding friction point: * For old projects, there is a friction point which both me and Vaibhav encountered (we both forgot about adding a separate `tsconfig.json` file in `nightwatch` dir...
Resolved in DefinitelyTyped/DefinitelyTyped#61866
Adding to this, if we write `it('some title', async () => {})`, Typescript infers the passed function as `NormalFunc` instead of `AsyncFunc`.
### CDP Commands: Issue: #3347 PR: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/61782 [MERGED] ### ClientCommands and ElementCommands: Issue: https://github.com/nightwatchjs/nightwatch/issues/3376 PR: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/62063 [MERGED] ### WebDriverProtocol: Issue: https://github.com/nightwatchjs/nightwatch/issues/3377 PR: In progress ### Ensure: Issue: #3375 PR: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/62067...
One such example: ```js await browser.url('https://duckduckgo.com'); await browser.expect.url().equals('https://duckduckgo.com'); // failing assertion await browser.expect.element('input[name=q]').to.have.attribute('placeholder'); // passing assertions ``` Here, even after setting `abortOnAssertionFailure` to false in the config file like below:...
I am able to reproduce this issue. The cause of this issue seems to be something happening in the Nightwatch queue due to the mixing of command and assertions (putting...
@efosoner Can you please confirm that the following is working for you? ```js module.exports = class customClick { async command(elementSelector) { return new Promise(async (resolve) => { await this.api.waitForElementPresent(elementSelector); await...