使用

FirefoxProfile

FirefoxProfilefp = new FirefoxProfile();

// set something on the profile...

DesiredCapabilities dc = DesiredCapabilities.firefox();

dc.setCapability(FirefoxDriver.PROFILE, fp);

WebDriver driver = new RemoteWebDriver(dc);

使用

ChromeOptions

ChromeOptions options = new ChromeOptions();

// set some options

DesiredCapabilities dc = DesiredCapabilities.chrome();

dc.setCapability(ChromeOptions.CAPABILITY

, options);

WebDriver driver = new RemoteWebDriver(dc);

selenium profile remotedriver的更多相关文章

  1. 利用Selenium自动化web测试

    简介: Selenium 是一个没有正式指导手册的开源项目,这让测试人员的问题调查很费时间.本文为基于 Selenium 1.0(发布于 2009 年 6 月)的测试期间的常见问题提供最佳实践. 简介 ...

  2. Python+Selenium笔记(九):操作警告和弹出框

    #之前发的 driver.switch_to_alert() 这句虽然可以运行通过,但是会弹出警告信息(这种写法3.x不建议使用)  改成 driver.switch_to.alert就不会了. (一 ...

  3. 【转发】Webdriver使用自定义Firefox Profile运行测试

    点击进入转发地址: 一般我们使用如下代码启动Firefox: 这样Selenium Server启动的Firefox将是一个全新的,不安装任何Add-On的Firefox. 如果有需要,我们可以使用我 ...

  4. selenium-webdriver 简单教程

    ruby环境下selenium/webdriver可以通过selenium-webdriver.gem包进行安装 gem install selenium-webdriver   支持语言及版本有ru ...

  5. Selenium遇到问题unknown error:cannot create default profile directory......

    1.selenium遇到问题unknown error:cannot create default profile directory...... 2.解决方案 问题1:把驱动放入C:\Windows ...

  6. selenium 加载RemoteDriver浏览器驱动

    title NodeWebDriver java -jar selenium-server-standalone-2.42.2.jar -Dwebdriver.ie.driver="C:\S ...

  7. Selenium启动本地firefox的profile

    ProfilesIni pi = new ProfilesIni();FirefoxProfile profile = pi.getProfile("default");WebDr ...

  8. 小技巧:selenium java中如何使用chrome默认的profile

    使用浏览器默认的profile可以在一定程度上实现免登录的效果,另外默认的profile中很多文件都被缓存了,也有利于加快测试的速度 System.setProperty("webdrive ...

  9. Selenium 3 没办法启用指定的Firefox Profile

    系统总会把profile复制到一个temp文件夹里,但是相关信息并不复制回去, 导致在测试注册登录功能时, 必须写在同一个脚本里:如果分成两段脚本, 登录会失败. public static void ...

随机推荐

  1. java.sql.Date/ java.util.Date/ java.util.Calendar 用法与区别

    在 JDK API  这样解释," 在 JDK 1.1 之前,类 Date 有两个其他的函数.它允许把日期解释为年.月.日.小时.分钟和秒值.它也允许格式化和解析日期字符串.不过,这些函数的 ...

  2. 本地私有库的实现 pod

    以pods的形式,引入本地相关文件 补充: pod repo 查看本地 pod 目录信息 一, 生成本地库 的描述文件.spec //1.进入的 本地库的 目录 cd  'xxx' //2.初始化本地 ...

  3. Windows Server上用命令来起停IIS站点

    平时,在Server上管理IIS,都是在界面上进行一些配置,然后再做一些start和stop操作... 对于配置的人来说,会做一些重复步骤,所以适当的使用命令,能大大提高效率. 下面命令是自己之前使用 ...

  4. Linux系统之ssh命令

    ssh命令用于远程登录上Linux主机. 常用格式:ssh [-l login_name] [-p port] [user@]hostname更详细的可以用ssh -h查看. 不指定用户: ssh 1 ...

  5. 南昌大学航天杯第二届程序设计竞赛校赛网络同步赛 I

    链接:https://www.nowcoder.com/acm/contest/122/I来源:牛客网 题目描述 小q最近在做一个项目,其中涉及到了一个计时器的使用,但是笨笨的小q却犯难了,他想请你帮 ...

  6. django终端打印Sql语句

    LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'console':{ 'level':'DEBU ...

  7. 5月 28日css前端知识

    a:link {color : #FF0000}    #未访问连接时设置颜色 a:visited {color:  #FF0000}   #访问过得连接设置颜色 a:hover {color: #F ...

  8. Spark2.3.0 报 io.netty.buffer.PooledByteBufAllocator.metric

    Spark2.3.0依赖的netty-all-4.1.17.Final.jar 与 hbase1.2.0依赖的netty-all-4.0.23.Final.jar 冲突 <!-- Spark2. ...

  9. python面向对象, 单例模式

    目录 单利模式 实现单利模式的方法 使用模块 使用__new__ 为了使类只能出现一个实例,我们可以使用 new 来控制实例的创建过程,代码如下: 使用装饰器 使用 metaclass 补充:元类(m ...

  10. OS---外存分配方式

    1.概述 1.1 在为文件分配外存空间时,所考虑的主要问题:如何有效利用外存空间?如何提高对文件的访问速度? 1.2 常用的外存分配方法:连续分配.链接分配.索引分配(在一个系统中,仅采用一种分配方式 ...