Yes. But I wanted to tell something about the last release

set!

It's completely useful and it's brilliantly managed now by sending first 
character and last character through selenium. I have checked with 3 lack 
character and it drastically produces the result. It quickly enters all the 
characters meanwhile selenium takes more than 15 seconds(approximately)

select!

Here Java script is setting the value as selected

arguments[0].options[1].selected=true 

and this is not equivalent to selenium because when we use selenium 
corresponding option is receiving the click which absolutely triggers all 
the actions which usually gets triggered when we choose manually. So this 
is not making any big difference and it's not giving good result as well. 

click!

Since you call element_call it waits for all four condition, but once after 
the click it is not waiting for *page to load *and it's expected when we 
click through JavaScript but we can include another statement which would 
help us to bring the result of  selenium click. There is a function in 
WATIR which will wait for page to load and this function has been written 
through Javascript, the function name is

 wait()

We need to call after executed the click, 

b.wait(30) 

So I can write code like

b.click!
b.wait(30)



So it would be meaningfull If your newly defined function click! would 
include wait(default_timeout) within itself.

something like

def click!
   document.getElementId('something').click
   b.wait(30)
end




What do you say?

On Tuesday, September 5, 2017 at 12:05:20 PM UTC+5:30, Titus Fortner wrote:
>
> Ah, yes, JavaScript isn't going to fire the same events as when Watir goes 
> through the driver end point. It doesn't sound like `#select!` will work 
> for you.
>
> On Monday, September 4, 2017 at 10:34:32 PM UTC-7, rajagopalan madasami 
> wrote:
>>
>> No I am not. Actually it's choosing but it's not reflecting, clicking the 
>> option through selenium refreshes the page and once option is selected 
>> field gets disabled but nothing is happening while I choose through 
>> JavaScript.
>>
>> On 04-Sep-2017 11:30 PM, "Titus Fortner" <[email protected]> wrote:
>>
>>> Out of curiosity, are you testing it on a site using React?
>>>
>>> On Mon, Sep 4, 2017 at 12:18 AM, <[email protected]> wrote:
>>>
>>>> To be close it 's choosing but not reflecting in the select list. But 
>>>> selenium select does the Job properly.  I believe after the choose, 
>>>> selenium is triggering something which Javascript fails to trigger that. 
>>>>
>>>>
>>>> On Monday, September 4, 2017 at 12:23:48 PM UTC+5:30, 
>>>> [email protected] wrote:
>>>>>
>>>>> I have written the below code
>>>>>
>>>>> browser.select_list(:id, "ProductGroup").select!("Fire Products")
>>>>>
>>>>>
>>>>> It's not choosing any option as well as it's not throwing any error. 
>>>>>
>>>>>
>>>>> I know this has been done through Java script and don't know why it's not 
>>>>> working. 
>>>>>
>>>>> -- 
>>>> -- 
>>>> 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 a topic in the 
>>> Google Groups "Watir General" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/watir-general/lUkyU5-C0Eg/unsubscribe.
>>> To unsubscribe from this group and all its topics, 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.

Reply via email to