Tips for eliminating the "Your connection is not secure" page in Firefox when using "Selenium with JavaScript"

My current project involves automating a secure URL using Selenium, WebdriverIO, and JavaScript. However, the page keeps redirecting to a "Your connection is not secure" message. I have attempted to address this issue by setting various preferences in the firefoxProfile, such as 'security.insecure_field_warning.contextual.enabled': false, but it has not resolved the problem.

Here is the configuration of my firefoxProfile:

firefoxProfile: {
    'media.navigator.permission.disabled': true,
    'media.peerconnection.video.h264_enabled': true,
    'media.navigator.streams.fake': true,
    'dom.webnotifications.enabled': false,
    'media.getusermedia.screensharing.enabled': true,
     setAcceptUntrustedCertificates: true,
     setAssumeUntrustedCertificateIssuer: true,
    'security.insecure_field_warning.contextual.enabled': false 
  },

Information about Selenium and Firefox versions being used:

  • "selenium-standalone": "~5.8.0"
  • Firefox version : 60.0 (64-bit)

Answer №1

If you want to eliminate the annoying "Your connection is not secure" page, follow these steps and make some adjustments to your Firefox profile:

  • Turn on the setAcceptUntrustedCertificates() flag by setting it to true
  • Activate the
    setAssumeUntrustedCertificateIssuer()
    flag by setting it to true
  • Set the preference
    "security.insecure_field_warning.contextual.enabled"
    to false

Your Firefox profile settings should look something like this:

firefoxProfile: {
    'setAcceptUntrustedCertificates': true,
    'setAssumeUntrustedCertificateIssuer': true,
  },

Additionally, remember to switch the Preference

security.insecure_field_warning.contextual.enabled
to false

For more in-depth information, refer to this discussion on Firefox selenium webdriver gives “Insecure Connection”

Note: Make sure that you are using a compatible combination of Selenium Client, GeckoDriver, and Firefox Browser.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Issues with Tags Functionality in Rails 5 Bootstrap JavaScript

I encountered some unusual issues while using Bootstrap 4 with the Rails 5 javascript tags. Initially, everything was working smoothly on this project and I hadn't made any modifications to the js files. However, suddenly, my collapsible navbar dropdo ...

Top method for detecting browser closure or navigation to a different page and initiating a logout

In the development of my GWT application, I am facing the challenge of detecting when a user leaves the application or closes the browser window (onUnload event) and initiating a logout process, which involves invalidating the session and performing certai ...

Creating default values for MongoDB databases using bdhash in Express.js and mongoose asynchronously

What is the best way to set a default value (like bdhash which is async) for a field in my mongoose schema? Currently, I am only seeing a promise inside. I'm using async/await correctly, but why does it seem like I'm getting just a promise? I als ...

tips for successfully transferring date and time data between json and nosql databases like firestore

Input: Created_At:Monday, 29 April 2019 15:07:59 GMT+05:30 Updated_At:Monday, 29 April 2019 15:07:59 GMT+05:30 I attempted to export data in JSON format from Firestore using the npm package firestore-export-import. However, the output I received was: ...

The Angular directive ng-model is not able to return a value

I'm currently troubleshooting an issue with the filters in an older project. Here's the HTML snippet: <input type="text" class="form-control" ng-model="FilterEventsEdit" ng-change="FilterEvents()" ...

Creating a search operation to target a particular element within an array of objects

Struggling with setting up a query that involves an array of objects within a specific index. My Schema includes a field that consists of an array of objects: {userID: ObjectID, someArray: [{foo: "bar"},{bar: "foo"}]} I am interested in retrieving record ...

Encountering a 404 error when trying to click on 'allow' after using Firebase Cloud Messaging, and attempting to add a service worker manually proves unsuccessful in resolving the issue

Currently, I am working on integrating FCM (Firebase Cloud Messaging) into a React app. Initially, I tested it on a simple project without React and everything worked smoothly. However, implementing it in the React app has presented some challenges for me. ...

What are some ways to ensure that the promise from postgres is fulfilled before moving forward with my code execution?

I am currently developing a Node-js application that requires retrieving information from the database before making another database call. However, I am facing an issue where the first check is not always resolved before proceeding to the next step. I hav ...

Set the radio button in Angular to be checked on the first option

I recently created a dynamic form with data from an API, including an ng-repeat to generate multiple radio buttons. Everything is working well, but I'm struggling to set the first radio button as checked by default. Any suggestions or solutions would ...

Problem with the property `className` not adding correctly on `$scope.eventSource`

Currently, I am utilizing the AngularJS directive to integrate the Arshaw FullCalendar. However, I am encountering an issue where the className specified in $scope.eventSource is not appearing on the event object. Here is a snippet of my code: $scope.even ...

`Troubleshooting Firebase Cloud Functions and Cloud Firestore integration`

I previously used the following Firebase Database code in a project: const getDeviceUser = admin.database().ref(`/users/${notification.to}/`).once('value'); Now, I am attempting to convert it for Firestore. My goal is to retrieve my users' ...

Extract solely the content from a span element that meets specific width requirements

Currently, I am facing an issue with a dynamically filled span that gets content added to it. Once the content reaches the width of 500px, I need to be able to read only the content within the first 300px. This content can consist of either one line or mul ...

Pictures failing to load on both Chrome and Safari browsers

For some reason, the images on my app are not appearing in Chrome and Safari but show up fine in Firefox. If you try to open the image URL in a browser, it works perfectly. However, when embedded in the HTML document, the image appears broken. I also test ...

Upon clicking close, the icons do not appear as expected

Currently, I am developing an application using Next.js. In this application, there is a functionality where clicking on the hamburger icon in mobile mode hides the icons of a Slide, and upon closing the hamburger, they should reappear. The overall struct ...

Issue with Vanilla JS form validation in Bootstrap 4

I successfully created a script to validate my Bootstrap 4 form, but I'm facing an issue where the error message is replacing the input field. Should I pursue validating BS4 with Vanilla JS or stick to using Bootstrap validation? What's the indus ...

What is the process for importing a Kaggle dataset into Elasticsearch?

Having just started with elasticsearch, I am venturing into creating a movie search application. My plan involves sourcing data from kaggle and integrating it into my locally set up elasticsearch at localhost:9200. Upon visiting the localhost link, I came ...

What could be causing my Internet Explorer browser to open twice when using Selenium and Cucumber?

As I delve into the world of automation testing, I am working on a simple test scenario using Selenium-Cucumber. The objective is to launch an IE browser and close it once the test is complete. However, there seems to be a recurring issue where the browse ...

What happens to the code that is situated *after* the closing of the HEAD tag and just before the opening of the BODY tag

I recently came across conflicting information regarding the placement of code between the HTML head and body tags. While it is considered bad practice and outside the spec, I have noticed an intermittent error in our complex code base that may be related ...

Is it possible to use Selenium for testing mobile web applications?

Seeking guidance on how to conduct automated testing using Selenium or another Ruby-aware tool for Android devices (Android Browser) and iPhone/iPad (Safari for iOS). Any recommendations or strategies would be appreciated. ...

Is it possible to enable sorting for every column in the b-table component?

After reviewing the information on sorting per column in the bootstrap-vue documentation, I am curious if it is possible to enable sorting for the entire table. ...