Since I upgraded to the latest version of Selenium, my Firefox driver does not work correctly. Having not received a response from a Google / Stack search, I hope someone has an answer.
I created the object model of the page to enter the web page by clicking on the admin site and filling in the login / password + submit. This code was written for Selenium 2.53.6, but still works for IE and Chrome. The part that is not suitable for me is a line of code:
driver.find_element_by_xpath(locators["login.open"]).click()
Locator:
locators["login.open"] = "//*[@href='//www.phptravels.net/admin']"
Since it works in IE and Chrome, then it puzzles me that Firefox can't .click() anymore?
I do not receive an error message in my console, it just does not press the admin button. Could this be related to this version of Firefox for Selenium 3 / geckodriver?
All drivers updated with pip
I use this site to practice my Selena: http://phptravels.com/demo/
Edit (1): I tried with Firefox versions 48 and 49 - still not working
Edit (2): geckodriver is configured using Firefox binaries, but the driver still does not execute .click()
from selenium import webdriver from selenium.webdriver.firefox.firefox_binary import FirefoxBinary binary = FirefoxBinary('path/to/binary') driver = webdriver.Firefox(firefox_binary=binary)
Edit (3): I check if the element is present by the xpath locator using is_displayed () and returns True . Therefore, I know that he can find the element.
Edit (4): 1) Tried with nightly build, as suggested, but not working. 2) Tried with find_element_by_link_text, also does not work. 3) I tried different versions of geckodriver (10.0, 11.0, 11.1 for 32 and 64 bits in all versions)
Edit (5): โThe container for plugins for Firefox stops workingโ is generated sequentially every time a test case fails.
Edit (6): Possible solution to the problem . I did another test on another website, and Firefox successfully executes .click (). On the first target web page, where .click () crashes is a huge javascript that runs when the page opens. This could ruin the ability of geckodriver to do .click () on pages with heavy javascript.
Edit (7): Using .send_keys (Keys.RETURN) using the key library works , but additional reconfiguration may be required if you use POM. Explicitly performing some time. Hibernating will get you, but for now, it's still fragile to use Selenium 3 + Firefox / geckodriver to automate your web browser. Go to the latest stable version (2.53.6) if you need to test Firefox (note: the latest versions of Firefox do not work).