from selenium import selenium

sel = selenium("localhost", 444, "*firefox", "http://www.baidu.com")

sel.start()
sel.open("/")
sel.type("id=kw", "selenium grid")
sel.click("id=su")
sel.wait_for_page_to_load("50000")

sel.stop()