question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sstop loading page after element is present.

See original GitHub issue

How can I stop loading page after some element is present? In plain Selenium for c# it’s possible to set page timeout to 1 sec, receive an error (page continues downloading) and then repeatedly check element presence in catch block.

It seems I can’t do this in Canopy, pageTimeout <- 1.0 doesn’t give me error.

I’d like something like

pageTimeout <- 1.0
try
  url "some url"
catch
  waitForElement ".number"
  pageTimeout <- 10

Thank you!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
uzhas-sovkacommented, Jan 17, 2018

Thanks, it works. BTW Canopy is amazing.

0reactions
lefthandedgoatcommented, Jan 17, 2018

Awesome!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Selenium + Python: How to stop page loading when certain ...
Yes it's possible by setting the pageLoadStrategy capability to none . Then wait for an element to be present and call window.stop to...
Read more >
How to stop a page loading from Selenium in chrome
We can stop a page loading with Selenium webdriver in Chrome browser by using the JavaScript Executor. Selenium can execute JavaScript ...
Read more >
Is it possible to stop page loading on the browser using ...
I use three steps with chrome and it works: Navigate to "about:blank"; Get element "body"; On that element send keys "Esc".
Read more >
How to stop a page loading from selenium in chrome - Edureka
Hi Savan,. Setting the pageLoadStrategy capability to none. Then wait for an element to be present and call window.stop to stop the loading:...
Read more >
refresh until page loads and stop loading page after ...
Hi, was wondering if anyone knew how to deal with these scenarios: 1. the website you are trying to access is having congestion...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found