0

How do I properly make it wait for a frame of a particular name to show up in python?

How do I make it wait for a website to load fully?

The documentation is vague to me and nothing seems to be working

WhatsInAName
  • 969
  • 2
  • 9
  • 12
  • can't you do following - import time time.sleep(10) – Mutant Mar 23 '12 at 01:29
  • Sleeps are usually not optimal because webpages may take longer than that to load fully. Also, sometimes you still want things to be as fast as possible (while fully loading). – WhatsInAName Mar 23 '12 at 01:30
  • 1
    possible duplicate of [Python Selenium (waiting for a frame)](http://stackoverflow.com/questions/9827150/python-selenium-waiting-for-a-frame) – jfs Mar 26 '12 at 06:22

2 Answers2

0

I had the same problem about waiting for an alert; I asked my question and the best answer that completely worked was this.

I think this is what you need, because you want to wait for a condition and sleep is not a good idea; you may wake too soon or too late.

Community
  • 1
  • 1
Zeinab Abbasimazar
  • 9,835
  • 23
  • 82
  • 131
0

The selenium page on Python pypi has this in its code example:

time.sleep(0.2) # Let the page load, will be added to the API

Assuming the code is up to date, it appears the functionality you want isn't yet available.

Theron Luhn
  • 3,974
  • 4
  • 37
  • 49