Getting confirmation window with Selenium-rc
Question: I'm running a selenium server (v.2.0b2) and writing a python script to run a
test suite on my webapp.

    
    
    from selenium import webdriver
    import selenium
    
    selenium = selenium.selenium('127.0.0.1', 3333, '*firefox', 'http://localhost/')
    selenium.start()
    profile = webdriver.FirefoxProfile('selenium')
    browser = webdriver.Firefox(profile)
    browser.get('http://localhost:8080/index.html?no_auto_login=1')
    

I have a login button that pops up a confirmation dialog, but it takes a round
trip the the server and back before it pops up.

    
    
    submit_button = browser.find_element_by_css_selector('#btnSubmit')
    submit_button.click()
    alert = browser.switch_to_alert()
    assert alert.text == 'Server Login Error...'
    alert.accept()
    

commenting out the items after submit_button.click() and then calling
selenium.is_confirmation_present() returns false

How can I wait for the confirmation box to be visible? Why doesn't
selenium.is_confirmation_present() return true?


Answer: I have not worked with Selenium 2.0 (web driver) but would suggest you to test
this with Thread.sleep(10). And if that works then it means conditional wait
in required in your case.

