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.
On Fri, Nov 3, 2017 at 9:07 AM, Jeff Nyman <[email protected]> wrote:
>
>
> On Friday, November 3, 2017 at 8:22:34 AM UTC-5, [email protected]
> wrote:
>>
>> browser.element(:id, "navlist")
>>
>>
>> Is it a pop up?
>>
>> And are you aware that `set!` function is using JavaScript not Selenium
>> send_keys?
>>
>
> It's not a pop-up, no. That script will actually run against it and you
> can see. It's basically just a paragraph element that pops out from the
> right edge of the screen. That element is only partly visible when the page
> is first loaded; then there's a delay, and then some JavaScript causes the
> paragraph to "pop out" a bit so it's selectable.
>
> Also, yes, I am aware of the `set!` function and how that works. In this
> case, however, set! is not being used for the element in question. It's
> just a click. These two lines are really the key ones:
>
> sleep 2
> browser.element(:id, "navlist").click
>
> Without that sleep, the next line fails. But wait_until checks also fail
> because the element in question is always present, visible, and enabled.
>
> So I'm just curious how people, using Watir, handle these kinds of
> situations.
>
> - 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.
>
--
--
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.