The object may not be visible
The first hack is to add a sleep before the select. Not elegant but the
kludge usually works
sleep 30
A better method is to wait for it to be present
b.select_list(:id => 'entry_10000').when_present.select('Ruby')
or
b.select_list(:id => 'entry_10000')..wait_until_present
On Thursday, August 10, 2017 at 2:14:50 AM UTC-5, Raja gopalan wrote:
>
> Why it's not a bug?
>
> Take any html file, select_list part is acting in a same way, that is,
> it's not waiting for select_list to exist, for an example, consider the
> code below
>
> require 'watir'
>
> b.goto 'bit.ly/watir-webdriver-demo'
>
> b.element(id: 'entry_100000').send_keys 'Hi'
>
> I made a mistake in Id but it waits for 30 seconds but If I write the
> below code
>
> require 'watir'
>
> b.goto 'bit.ly/watir-webdriver-demo'
>
> s = b.select_list(id: 'entry_100000').select 'Ruby'
>
>
> It's not waiting for select_list to exist.(Made a mistake in the id).
>
>
>
> On Wednesday, August 9, 2017 at 8:44:31 PM UTC+5:30, Titus Fortner wrote:
>>
>> This is unlikely a bug in Watir.
>>
>> For us to investigate further please provide
>> Your code
>> Applicable portion of html
>> A log of your test run in debug mode
>>
>
--
--
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.