mridul.ahuja 4 Coding Enthusiast

I'm using selenium with firefox to load a webpage. The page uses ajax to load new content on clicking the Display More Results button.

However when I try to find this button and simulate a click, it gives the following Stacktrace error. Can anyone tell me what I'm doing wrong ?

Here's my code:

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from import WebDriverWait

driver = webdriver.Firefox()

    elem = elem = WebDriverWait(driver, 20).until(lambda driver : driver.find_element_by_id('scroll2'))
    print "clicked"
except Exception as e:
    print e


Here's the error I'm getting:

    at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpAQcOR7/extensions/
    at FirefoxDriver.prototype.findElement (file:///tmp/tmpAQcOR7/extensions/
    at DelayedCommand.prototype.executeInternal_/h (file:///tmp/tmpAQcOR7/extensions/
    at DelayedCommand.prototype.executeInternal_ (file:///tmp/tmpAQcOR7/extensions/
    at DelayedCommand.prototype.execute/< (file:///tmp/tmpAQcOR7/extensions/