1

I'm using the page object gem with a page that contains a link.

When the link is clicked, the browser navigates to a new page, and the HTML renders as expected.

However, my script is always returning a Timeout::Error: Timeout::Error. After looking at the browser network activity, I noticed a pattern with a long running get that never completes.

If I run the script and then go to the console and issue the command $.connection.hub.stop(), the script will not time out.

Is there a way to perform a click_no_wait or to click and then execute a script via the use of page_object_gem ?

Here is my page-object attempt, but it is resulting in a timeout still.

class MyThing

   include  PageObject
   include  PageObject::PageFactory

   link(:show_details, :id => 'detailLink')

   def click_show_details_no_wait
     begin
        show_details_element.click
     rescue Exception => e
       execute_script('$.connection.hub.stop();')
     end
   end 

end

1 Answer 1

2

It is hard to suggest without your page. My first idea is to try to do

 show_details_element.fire_event('click')

instead of a usual click.

The second idea is take a look at

Good luck.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.