Python Selenium timeout move to next item in loop
<p>I have a loop that takes a list of items and runs various functions on them...</p>

<pre><code>def init_driver():
    ffprofile = webdriver.FirefoxProfile("my_profile");
    ffprofile.add_extension(extension="myaddon.xpi")
    return driver

def check_item
    print ( "Checking Item : ")
    inputElement.submit()
    print ( "Submit has been pressed" )
    input(" Do Something Else ")
    timeelapsed = a + 1

driver = init_driver()

for i, item, in enumerate(item_list):
    check_item(item)
</code></pre>

<p>I am trying to add a try exception to inputElement.submit() so if for any reason it times out while running this (which it has been known to do) then it would break out of the loop and move to the next iteration.</p>

<p>I have tried using break but that doesn't work because I am not in the loop, can anyone help?</p>

<p><strong>UPDATE</strong></p>

<p>This is the timeout message I get</p>

<pre><code> File "C:\Python34\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: Timed out waiting for page load.
</code></pre>