当前位置: 首页 > news >正文

[selenium] Handling Untrusted SSL certificate error in firefox

http://eloraparija.com/firefox-profile/

Sometimes we see the below error while accessing a website.Then how to handle that error???

This connection is untrusted.

You have asked Firefox to connect securely to mail.google.com,but we can’t confirm that your connection is secure.

 

You need to use firefox profile here.

 

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;


public class CrossBrowser {

	private static WebDriver driver;
	private static String browserType="FIREFOX"; 
	public static void main(String[] args) {

		if(browserType.equals("FIREFOX")){
		FirefoxProfile profile = new FirefoxProfile();
    		profile.setEnableNativeEvents(true);	
    		profile.setAcceptUntrustedCertificates(true);
    		profile.setAssumeUntrustedCertificateIssuer(true); 
		    driver=new FirefoxDriver(profile);
     }
}

 

We can use the profile concept only in firefox.

 

转载于:https://www.cnblogs.com/qingshuihe/p/4972339.html

相关文章:

  • Java8 Lumbda表达式 初步
  • c++编程规范的纲要和记录
  • QCon旧金山演讲总结:阿里无线技术架构演进
  • js 日期2015/12/22/16/45替换2015-12-22 16:45格式
  • windows socket错误码及出错原因
  • SQL 数学函数,字符串函数与时间日期函数11月18日
  • hdu 5510 Bazinga(暴力)
  • ubuntu 无法更新/下载软件,报404错误解决办法
  • HDFS集中化缓存管理
  • 模块化
  • 《FPGA全程进阶---实战演练》第二章之硬件平台的搭建
  • 【APUE】Chapter5 Standard I/O Library
  • centos下yum安装crontab+mysql自动备份
  • JAVA Socket 编程---Socket 和 ServerSocket
  • redhat+11g+rac 安装数据库软件时只有一个节点可选
  • $translatePartialLoader加载失败及解决方式
  • 2018以太坊智能合约编程语言solidity的最佳IDEs
  • Android 初级面试者拾遗(前台界面篇)之 Activity 和 Fragment
  • docker-consul
  • es6(二):字符串的扩展
  • Fundebug计费标准解释:事件数是如何定义的?
  • Nacos系列:Nacos的Java SDK使用
  • Redis的resp协议
  • Vue 动态创建 component
  • vue+element后台管理系统,从后端获取路由表,并正常渲染
  • 记录一下第一次使用npm
  • 仓管云——企业云erp功能有哪些?
  • "无招胜有招"nbsp;史上最全的互…
  • # C++之functional库用法整理
  • (02)vite环境变量配置
  • (1)(1.11) SiK Radio v2(一)
  • (1)(1.13) SiK无线电高级配置(五)
  • (3)STL算法之搜索
  • (C#)获取字符编码的类
  • (Matlab)基于蝙蝠算法实现电力系统经济调度
  • (二)正点原子I.MX6ULL u-boot移植
  • (附源码)springboot优课在线教学系统 毕业设计 081251
  • (附源码)ssm经济信息门户网站 毕业设计 141634
  • (九)One-Wire总线-DS18B20
  • (篇九)MySQL常用内置函数
  • (十八)devops持续集成开发——使用docker安装部署jenkins流水线服务
  • (算法)Game
  • (原創) 系統分析和系統設計有什麼差別? (OO)
  • (转载)PyTorch代码规范最佳实践和样式指南
  • .NET core 自定义过滤器 Filter 实现webapi RestFul 统一接口数据返回格式
  • .Net CoreRabbitMQ消息存储可靠机制
  • .NET 事件模型教程(二)
  • .net 怎么循环得到数组里的值_关于js数组
  • //解决validator验证插件多个name相同只验证第一的问题
  • ??eclipse的安装配置问题!??
  • [ vulhub漏洞复现篇 ] Apache Flink目录遍历(CVE-2020-17519)
  • []T 还是 []*T, 这是一个问题
  • [1127]图形打印 sdutOJ
  • [20161101]rman备份与数据文件变化7.txt
  • [Android]竖直滑动选择器WheelView的实现