0

I have an automated test which fills the User + Password fields and click a certain button to Login.

During the development session I managed to run this automation tens of times without any problem. Suddenly today I found out that the response to the automated test has changed and now I can't Login. I can say that the WEB under test didn't change. I can almost tell for sure that the FireFox that is run by the automated test has updated without my control (the browser that the automated test runs has an up-to-date version 54 while the browser that I run has a version 52).

I have tried to configure the Version 54 so that he won't pop-up the message (through the about:config) but my settings are not saved.

First of all I would like to know how can I manage to get rid of the pop-up message ?

Second thing I would like to know how can I prevent the updates of the browser version ?

Could it be that the geckodriver has its own FireFox settings and Version ?

Moshe S.
  • 2,834
  • 3
  • 19
  • 31
  • I can add and say that the problem is that as soon as I filled the Password I click a Login button, and now that the FireFox browser updated without my control it pops the warning which causes my automation to click the pop up message instead of the Login button – Moshe S. Jun 21 '17 at 16:48
  • Can you secure the connection? – user2357112 Jun 21 '17 at 21:29

2 Answers2

1

Firstly, you can configure FirefoxProfile to accept untrusted connections, as shown below:

from selenium import webdriver

profile = webdriver.FirefoxProfile()
profile.accept_untrusted_certs = True

driver = webdriver.Firefox(firefox_profile=profile)

This answer contains configuration details about other browsers as well.

Secondly, in order to disable automatic updates for Firefox browser, you can follow following steps:

  1. Launch Firefox and go to 'Tools->Options->Advanced'.
  2. Click on 'Updates' tab.
  3. Click on 'Never Check for updates' option button under 'Firefox updates' section.
  4. Restart Firefox.

Let me know, if it resolves your issue.

Mahipal
  • 900
  • 1
  • 5
  • 7
  • Thanks, you solved my problem. Isn't there a way to do this setting once ? regarding the automatic updates, I am aware of the setting that you suggested but I think that: (a) There are 2 Firefox installations now that I have geckodriver and if I'll set it, it won't apply to the geckodriver too. (b) It seemed to me like the Firefox of the geckodriver blocks the modifications – Moshe S. Jun 22 '17 at 05:41
  • You are welcome :-). I am not sure, however, in my environment, I have just disabled the automatic updates using the steps I had shared and it works i.e. firefox does not update itself automatically. – Mahipal Jun 22 '17 at 05:52
  • Do you happen to know, if it is possible to make the geckodriver use the same Firefox that I have installed on my station ? – Moshe S. Jun 22 '17 at 06:32
  • I currently have a Java based automation framework with standard Firefox installation. In addition, for geckodriver, I have downloaded geckodriver.exe and set its path for System property webdriver.gecko.driver i.e. `System.setProperty("webdriver.gecko.driver", "././configs/geckodriver.exe");`. – Mahipal Jun 22 '17 at 06:54
  • I guess, this answer might resolve your issue: https://stackoverflow.com/questions/40208051/selenium-using-python-geckodriver-executable-needs-to-be-in-path – Mahipal Jun 22 '17 at 06:58
0

You need to set acceptInsecureCerts to true in your capabilities.

DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability(FirefoxDriver.MARIONETTE, true);
capabilities.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS, true);

WebDriver webDriver = new FirefoxDriver(capabilities);

Edit: Sorry about the java code. The thing is you need set that capability.

Taylan Derinbay
  • 128
  • 3
  • 13