On Friday, November 3, 2017 at 9:45:07 AM UTC-5, Titus Fortner wrote:
>
> You have to look at what is different in the condition you want vs the
> condition you don't.
> In this case you want to wait for `element.div(id: 'areas').style('left')
> == '-50em'` (or something)
> If you have open the inspector you can see that value changing during page
> load.
>
I've tried things like that but it doesn't seem to work. Maybe I'm doing
things wrong. For example, I tried this originally:
browser.wait_until { browser.element(:id, "navlist").style("right") ==
"-20px" }
That's for the navlist element. That's where it rests after it pops out.
That still leads to this error when trying to click it:
unknown error: Element is not clickable at point (-4, 130)
(Selenium::WebDriver::Error::UnknownError)
Basically, the same error that would happen if the sleep statement wasn't
there. I did do something similar to what you suggest, like this:
browser.wait_until { browser.element(:id, "areas").style("left") == "-50em"
}
That's for the div element that wraps the navlist. That simply gives this:
in `until': timed out after 30 seconds, waiting for true condition on
Basically, it just times out, never recognizing the condition.
The line in my project that causes the pop-out is this:
https://github.com/jeffnyman/veilus/blob/master/public/javascripts/site.js#L4
These things were put in place specifically to trip up automation to see
how different libraries handle it.
- Jeff
--
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]
---
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.