Click() method not working (Windows, FF, Python, Selenium bindings)

121 views
Skip to first unread message

testtesting...@gmail.com

unread,
Jun 20, 2013, 8:03:25 AM6/20/13
to seleniu...@googlegroups.com
Recently i switched to Python 3.3.2, the newest Firefox and downloaded the recent Selenium webdriver release.
I was using that automation script before with Python 2.7 i think and it worked flawless. Now after switching something as easy as clicking on a simple link does not work anymore.
The code snippet:

from selenium import selenium
from selenium import webdriver
from selenium.webdriver import ActionChains

ffprofile = webdriver.FirefoxProfile("xxxxxxxxxxx")  
driver = webdriver.Firefox(ffprofile)
driver.get(user)
inv = driver.find_elements_by_link_text("Inventory")

inv[0].click()

I cant get it to work with Actions chains either:

achains = ActionChains(driver)
test = achains.move_to_element(inv[0])
test = achains.click(inv[0])
test = achains.release(inv[0])
test.perform()

I get no exception, so the link is found. The website did not change since I have updated Python/Selenium.

Srisowrabha Kumar

unread,
Jun 21, 2013, 4:20:54 AM6/21/13
to seleniu...@googlegroups.com
Hi,

Please make sure, you are using the right version of Python bindings for WD, Python and Firefox version. Also make sure the WD API is developed on Python 3.3.2 or older versions.

As a workaround you can perform the below steps:

from selenium.webdriver.common.keys import Keys
driver.find_element_by_SOMETHING("").send_keys(Keys.RETURN)
or
driver.find_element_by_SOMETHING("").send_keys(Keys.ENTER)

Thanks,

Sowrabha
Reply all
Reply to author
Forward
0 new messages