Selenium 3 没办法启用指定的Firefox Profile
系统总会把profile复制到一个temp文件夹里,但是相关信息并不复制回去, 导致在测试注册登录功能时, 必须写在同一个脚本里;如果分成两段脚本, 登录会失败。
public static void main(String[] args) throws InterruptedException, IOException {
System.setProperty("webdriver.gecko.driver", "D:\\geckodriver-v0.19.1-win64\\geckodriver.exe");
ProfilesIni pi = new ProfilesIni();
FirefoxProfile profile = pi.getProfile("defaultqhj");
FirefoxOptions options = new FirefoxOptions();
options.setProfile(profile);
WebDriver driver = new FirefoxDriver(options);
执行过程:
1514974757657 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-profile" "C:\\Users\\qianhj\\AppData\\Local\\Temp\\rust_mozprofile.OgmPyiUGiXHk"
Selenium 3 没办法启用指定的Firefox Profile的更多相关文章
- 【转发】Webdriver使用自定义Firefox Profile运行测试
点击进入转发地址: 一般我们使用如下代码启动Firefox: 这样Selenium Server启动的Firefox将是一个全新的,不安装任何Add-On的Firefox. 如果有需要,我们可以使用我 ...
- Firefox Profile (2)
一些关于selenium copy Firefox profile to a temp directory的讨论 https://stackoverflow.com/questions/6787095 ...
- Firefox Profile
win7环境下打开Firefox,跳出提示信息 "无法加载你的firefox配置文件 它可能已经丢失或无法访问" 解决方法: 1.按下WIN+R 调出运行,然后输入: firefo ...
- Your Firefox profile cannot be loaded. It may be missing or inaccessible
ubuntu下出现打开frefox出现Your Firefox profile cannot be loaded. It may be missing or inaccessible 1:用命令行输入 ...
- selenium各种场景下的启动Firefox
开始学习selenium时为了启动Firefox可谓费尽周折,在大神的帮助下才堪堪搞定,走出了selenium的第一步:jdk1.8 + selenium_2.46 + Firefox国际版40.0. ...
- RF Firefox Profile
默认情况下,robot framework是启动不带任何配置信息的firefox,如果需要启动带有profile的话,增加一个参数即可,如 Open Browser https://aws-qa5.i ...
- python环境配置selenium与IE、Chrome、Firefox、PhantomJS
安装.升级selenium pip install -U selenium 下载对应平台最新版的browser driver chrome: http://chromedriver.storage.g ...
- 【Selenium】【BugList1】调用firefox浏览器,报 TypeError: 'module' object is not callable
#coding=utf-8 from selenium import webdriver driver=webdriver.firefox() 解决方法:firefox改为Firefox
- Selenium WebDriver 下 plugin container for firefox has stopped working
用selenium 的webdriver 和 firefox 浏览器做自动化测试,经常会出现 plugin container for firefox has stopped working 如下图所 ...
随机推荐
- MySQL 表名区分大小写设置
1.关闭MySQL服务: 控制面板主页-管理工具-服务-MySQL服务 2.在服务器运行目录找到my.ini 或者my.cnf文件: 在[mysqld]下面增加一行添加 :lower_ ...
- $("li")是对象类型不是数组类型
- SDL相关资料
SDL(Simple DirectMedia Layer)是一个自由的跨平台的多媒体开发包,适用于 游戏.游戏SDK.演示软件.模拟器.MPEG播放器和其他应用软件.目前支持windows,linux ...
- 从__acrt_first_block == header 谈起,记录dll链接不一致的问题
最近写了一个postgresql的数据库连接池dll.写的比较随意,某个头文件如下: #pragma once #include "common.h"#include " ...
- MAC OSX下用pip安装lxml时遇到xmlversion.h not found的解决办法
http://blog.csdn.NET/wave_1102/article/details/37730589 今天在Mac下用pip安装lxml,总是报如下错误: etree_defs.h::: f ...
- CentOs 6 或 7 yum安装JDK1.8 (内含报 PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.163.com'"错误解决方案)并分析为什么不能yum安装
查看JDK的安装路径 # java -version============================查看Linux系统版本信息# cat /etc/redhat-releaseCentOS r ...
- Java获取当日的起始时间,结束时间,现在时间,是否在时间段中。
当日的起始时间 public static Date getTodayStartTime() { Calendar todayStart = Calendar.getInstance(); today ...
- datalist 分页
Asp.net提供了三个功能强大的列表控件:GridView.DataList和Repeater控件,相对GridView,DataList和Repeater控件具有更高的样式自定义性,很多时候我们喜 ...
- Django rest framework源码分析(3)----节流
目录 Django rest framework(1)----认证 Django rest framework(2)----权限 Django rest framework(3)----节流 Djan ...
- ubuntu 16.04安装smatrgitHG工具
SmartGit/HG 是一款开放源代码的.跨平台的.支持 Git 和 Mercurial 的 SVN 图形客户端,可运行在Windows.Linux 和 MAC OS X 系统上. 1.安装 Ubu ...