selenium webdriver sendkeys() using python and firefox

后端 未结 3 1137
悲&欢浪女
悲&欢浪女 2020-12-10 13:54

I am using selenium 2.25.0, firefox 3 and python 2.6.6. I am trying to run a selenium function which uses sendkeys():

3条回答
  •  感动是毒
    2020-12-10 14:26

    Use following as a work around I think It may work.

    driver = webdriver.Firefox()
    elem = driver.find_element_by_name('j_username')
    elem.clear()
    app = Application.Application()
    app.window_(title_re='*.Firefox.*').TypeKeys('username')
    

    Last two lines are in Python(pyWinauto)

提交回复
热议问题