Closed munkyjunky closed 9 years ago
Have you tried referencing the element by its css selector directly? Does that produce the same error?
The following works:
browser.waitForElementVisible('.list-container', util.timeout);
Keeping it within the expect
/ page api, however, still breaks it with the same error:
homepage.expect.element('.list-container').to.be.visible.after(util.timeout);
Thanks, I see the issue, will fix soon.
I'm seeing this issue occurring again. Running nightwatch v0.9.0.
This test fails:
login_modal.expect.element('@modal').to.not.be.visible.before(browser.globals.timeout);
header_login.expect.element('@login_button').to.not.be.present;
header_login.expect.element('@logout_button').to.be.visible;
with output:
Expected element <.Login__modal> to not be visible in 10000ms - Expected "not visible" but got: "visible"
This test works:
browser.pause(browser.globals.timeout);
login_modal.expect.element('@modal').to.not.be.visible;
header_login.expect.element('@login_button').to.not.be.present;
header_login.expect.element('@logout_button').to.be.visible;
Trying CSS selectors instead of page objects makes no difference to this.
Are you sure it's the same issue? There have been no changes in the area and your test doesn't seem to be doing exactly the same thing.
I previously raised this issue here #544, which was marked as a duplicate of this bug, so I thought it best to comment here. If you think it's a separate issue I can open a new issue instead?
Apologies, should have also referenced #544 in my previous comment.
Btw, you can avoid .before(browser.globals.timeout);
by setting the global waitForConditionTimeout
, as it is done here.
Have you changed anything in your setup? Like selenium or browser version?
On Thursday, 26 May 2016, Simon W notifications@github.com wrote:
I previously raised this issue here #544 https://github.com/nightwatchjs/nightwatch/issues/544, which was marked as a duplicate of this bug, so I thought it best to comment here. If you think it's a separate issue I can open a new issue instead?
Apologies, should have also referenced #544 https://github.com/nightwatchjs/nightwatch/issues/544 in my previous comment.
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/nightwatchjs/nightwatch/issues/549#issuecomment-221855673
This is in a different project to my original issue, although I don't believe it was ever solved in that one either.
I'm running node v0.12.9, selenium server 2.53.0, and chrome webdriver from this package, v2.21.2. Also tested this under node 4.4.3, without change.
And in nightwatch 0.8.18 it works as expected?
Is it possible to see the verbose log output for the failing test in 0.9.0?
No, doesn't work in nightwatch 0.8,18 either. Since raising the issue originally I can't definitively tell you it has worked - this is for a work project and I swapped teams for a while so dropped the work we're doing with Nightwatch. I don't think this is something that has been broken in a recent release.
I've had to blank a few values in the output as this is client work and I'd rather avoid posting up their URLs, and also removed my login info. Output here: https://gist.github.com/munkyjunky/70d3105f9d1a86db6e3e07c106d2cc57
Ok, from the output here is looks like the element is not visible so for some reason nightwatch is incorrectly reporting that it is. I'll look into it, can you open a separate issue please?
Opened new issue #997
Addition of the
after
method to my assertions causes an error to be thrown.Code:
Error:
Removing the
after
method prevents this error from occurring, however my test fails (as expected in that case, as the element is not visible). What I'm trying to achieve with my test:Changing the section declaration for just an element causes the same error. I suspect this error is happening as I'm expecting a section of a page to become visible that at the initial time of assertion is not on the page. Switching to
browser.waitForElementVisible
allows me to complete the test, so I think this is an issue within theexpect
API.Can't post the full test due to this being a work project.