python stacktrace at firefoxdriver.prototype.findelement internal
Question: 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 selenium.webdriver.support.ui import WebDriverWait
    
    driver = webdriver.Firefox()
    driver.get("http://dir.indiamart.com/search.mp?ss=plastic+machinery")
    
    
    try:
        elem = elem = WebDriverWait(driver, 20).until(lambda driver : driver.find_element_by_id('scroll2'))
        elem.click()
        print "clicked"
    except Exception as e:
        print e
    
    
    driver.close()
    

**Here's the error I'm getting:**

    
    
    Message: 
    Stacktrace:
        at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpAQcOR7/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
        at FirefoxDriver.prototype.findElement (file:///tmp/tmpAQcOR7/extensions/fxdriver@googlecode.com/components/driver-component.js:10779)
        at DelayedCommand.prototype.executeInternal_/h (file:///tmp/tmpAQcOR7/extensions/fxdriver@googlecode.com/components/command-processor.js:12661)
        at DelayedCommand.prototype.executeInternal_ (file:///tmp/tmpAQcOR7/extensions/fxdriver@googlecode.com/components/command-processor.js:12666)
        at DelayedCommand.prototype.execute/< (file:///tmp/tmpAQcOR7/extensions/fxdriver@googlecode.com/components/command-processor.js:12608)
    


Answer: I'm not sure what the problem is because there is no error message. However,
this syntax looks rather strange:

    
    
    elem = elem = WebDriverWait(...
    

Also, I noticed that when I went to that page the div with the id "scroll2"
was not visible. The visible one was "scroll4". You'll probably have to write
some other code to look for the visible div with "scroll" in it.

