What JS library is your  Angular/React/JQuery?

On Tuesday, November 6, 2018 at 9:56:50 AM UTC-6, rajagopalan madasami 
wrote:
>
> Hi Titus,
>
> Here is I used waitAndclick method which uses b.element.click and then I 
> used waitAndClickButton method which uses b.button.click but both of them 
> are throwing the error. 
>
> def waitAndClickButton(locator, action, name, data)
>   puts "ClickButton   : #{name}"
>   sleep 2
>   loc = getLocator(locator)    
>   @b.button(loc.first => loc.last).click
>   waitForPageLoad
> end
>
> def waitForPageLoad
>   @b.wait_until(timeout: @Page_Load) {@b.execute_script("return 
> (jQuery.active === 0)").eql? true}
> end
>
> You may ask why I put sleep 2, this is also another weird problem I am 
> facing, program click the button and program successfully
>
> moves to the next line but application is not replicating that, Application 
> is not receiving that click so it remains in the same page. 
>
> Do you have any idea how to resolve this without using wait?
>
>
> On Tue, 6 Nov 2018 at 21:17, Titus Fortner <titusf...@gmail.com 
> <javascript:>> wrote:
>
>> That's weird because it is failing in the wait_for_exists method, but the 
>> error message calls the inspect method which shows that it has been 
>> located. Can you share your waitAndClick method? I'd like to figure out how 
>> to reproduce this.
>>
>> Is it possible for the element to have gone stale? That could account for 
>> this discrepancy.
>>
>> If you turn on Selenium logging it would be obvious if it were polling 
>> for `enabled` and getting exceptions. `Selenium::WebDriver.logger.level = 
>> :info`
>>
>>
>> On Tuesday, November 6, 2018 at 5:37:40 AM UTC-6, rajagopal...@gmail.com 
>> wrote:
>>>
>>> Hi Titus,
>>>
>>> I am facing weird problem,
>>>
>>> When I try to click the element, even after page arrives properly, it is 
>>> waiting for 60 seconds and not clicking the button sometimes, it throws 
>>> below error. but 4 out of 10 times it happens and rest of the time it runs 
>>> successfully. What might be the problem? I never faced such a problem so 
>>> far. 
>>>
>>>
>>> Watir::Exception::UnknownObjectException: timed out after 60 seconds, 
>>> waiting for #<Watir::HTMLElement: located: true; {:id=>"NavContinue"}> to 
>>> be located
>>>
>>>   0) AGCSquoteCreation Test1
>>>      ?[31mFailure/Error: raise unknown_exception, msg?[0m
>>>      ?[31m?[0m
>>>      ?[31mWatir::Exception::UnknownObjectException:?[0m
>>>      ?[31m  timed out after 60 seconds, waiting for 
>>> #<Watir::HTMLElement: located: true; {:id=>"NavContinue"}> to be located?[0m
>>>      ?[36m# ./Source/FrameWorkModules/Elements/Button.rb:15:in 
>>> `waitAndClick'?[0m
>>>      ?[36m# ./Source/FrameWorkModules/Browser/Framework.rb:15:in `block 
>>> in execute'?[0m
>>>      ?[36m# ./Source/FrameWorkModules/Browser/Framework.rb:11:in 
>>> `each'?[0m
>>>      ?[36m# ./Source/FrameWorkModules/Browser/Framework.rb:11:in 
>>> `execute'?[0m
>>>      ?[36m# ./Source/FrameWorkModules/Browser/PullTheTestCases.rb:16:in 
>>> `call'?[0m
>>>      ?[36m# ./Source/Run_Spec.rb:40:in `block (4 levels) in <top 
>>> (required)>'?[0m
>>>      ?[36m# ------------------?[0m
>>>      ?[36m# --- Caused by: ---?[0m
>>>      ?[36m# Watir::Wait::TimeoutError:?[0m
>>>      ?[36m#   timed out after 60 seconds, waiting for true condition on 
>>> #<Watir::HTMLElement: located: true; {:id=>"NavContinue"}>?[0m
>>>      ?[36m#   ./Source/FrameWorkModules/Elements/Button.rb:15:in 
>>> `waitAndClick'?[0m
>>>
>>> -- 
>> -- 
>> Before posting, please read 
>> https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group.
>>  
>>
>> In short: search before you ask, be nice.
>>  
>> watir-...@googlegroups.com <javascript:>
>> http://groups.google.com/group/watir-general
>> watir-genera...@googlegroups.com <javascript:>
>> --- 
>> 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 watir-genera...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
-- 
Before posting, please read 
https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group.
 
In short: search before you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com
--- 
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 watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to