rubycdp / ferrum

Headless Chrome Ruby API
https://ferrum.rubycdp.com
MIT License
1.76k stars 127 forks source link

click_on times out #469

Closed sdhull closed 4 months ago

sdhull commented 4 months ago

Describe the bug Working on switching from Selenium to cuprite. One of the errors I see frequently is

Ferrum::TimeoutError:
       Timed out waiting for response

Digging in to one example, I've found the offending line is click_link("Some text") and the link in question is sending an ajax request to the server and the endpoint is doing render js: "..."

Examining the test server log, it shows the request does get received by the server & response is rendered in 95ms

To Reproduce Sadly I don't have a way to repro, I'm still investigating.

Expected behavior It seems like cuprite is trying to be too helpful here, trying to make sure "something happened" after clicking a link.

But IMO clicking a link should simply click the link and move on. If I want to wait for the next page to load I can do so with expect(page).to have_current_path(...) or if I want to wait for network requests to complete, or page to reload, that's all possible too.

Screenshots N/A

Desktop (please complete the following information):

Additional context N/A

sdhull commented 4 months ago

bah, meant to post this in cuprite šŸ¤¦ apologies, closing