Comments (9)
You can use this example test to reproduce this:
describe('ecosia demo', function() {
before(() => {
browser
.navigateTo('https://ecosia.org/');
});
it('waitUntil callback demo', function() {
browser
.waitUntil(async function() {
const title = await browser.getTitle();
console.log(title); // <-- returns NightwatchAPI
return true;
})
.perform(async function() {
const title = await browser.getTitle();
console.log(title); // <-- returns correct result (title)
});
});
});
from nightwatch.
Yeah, it didn't for this particular case. But if you change the line it('waitUntil callback demo', function() {
to it('waitUntil callback demo', async function() {
in the example test (notice the added async
before function definition), it will work correctly.
from nightwatch.
I am looking into this issue
from nightwatch.
@garg3133 Can I get the full script so I can test it locally?
from nightwatch.
@garg3133 I was able to reproduce the problem. Thanks.
from nightwatch.
Here is an update: I have regressed to previous versions of Nightwatchjs, all the way back to 3.1.0, and I get the same error. It appears waitUntil
never really worked as expected 🤔
from nightwatch.
Yeah, it didn't for this particular case. But if you change the line
it('waitUntil callback demo', function() {
toit('waitUntil callback demo', async function() {
in the example test (notice the addedasync
before function definition), it will work correctly.
Exactly, I just observed that.
from nightwatch.
As a contrast, in the perform
function, I removed async/await
and made it non-async
and I get the same error. That is, the Nightwatch API.
from nightwatch.
I am woking on this issue and was able to reproduce it.
Looking forward to solve it .
from nightwatch.
Related Issues (20)
- 4000+ tests eats up disk space *nom* HOT 2
- Add aliases for `getCssProperty` command in new Element API HOT 1
- Feat: Add aliases for `getAttribute` in the new Element API. HOT 1
- Feat: Add `prop` and `property` as an alias of `getProperty` Command in the new Element API HOT 1
- Add `tagName` as an alias of `getTagName` in the new Element API
- Add `accessibleName` as an alias for `getAccessibleName` in the new Element API.
- Add `text` as an alias for `getText` command in the new Element API. HOT 1
- Nightwatch HTML Report overall time displaying different overall times within the same report HOT 1
- Stale element reference errors should report the element and/or line of code it considers stale HOT 2
- isPresent command misleading, works same as waitUntilElementPresent HOT 2
- unhandledRejection using findElement chained to find HOT 1
- Show command usage location in new Element API errors. HOT 4
- Feat: Add `.print()` command in nightwatch. HOT 6
- Need to bump ejs version to 3.1.10 due to vulnerability HOT 2
- When opening this page https://nightwatchjs.org/guide/overview/what-is-nightwatch.html docs are overlapping.
- While opening this page https://nightwatchjs.org/guide/overview/what-is-nightwatch.html docs writing are overlapping. HOT 3
- Functional tests fail with socket hang up mid test
- Can't assert off find as documentation would suggest HOT 1
- Behavior change of .setValue() between 3.6.0. and 3.6.3 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nightwatch.