使用

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. 百度地图sdk使用

    1.android开发百度地图定位,我怎么老是定到几内亚湾 权限问题,首先安卓6.0之后的Android的系统需要动态申请权限. 然后百度地图的sdk的不同功能,申请的权限不同,每个功能都需要看官方文 ...

  2. docker的常用操作

    查看所有的镜像: docker images 查看所有的容器: docker ps -a 查看正在运行的容器: docker ps 移除容器: docker rm -f 容器id 移除镜像: dock ...

  3. innodb的读写参数优化

    (1)    读取参数,global buffer pool以及 local buffer Innodb_buffer_pool_size,理论上越大越好,建议服务器50%~80%,实际为数据大小80 ...

  4. pytorch 加载mnist数据集报错not gzip file

    利用pytorch加载mnist数据集的代码如下 import torchvision import torchvision.transforms as transforms from torch.u ...

  5. POJ1052 Plato's Blocks

    题目来源:http://poj.org/problem?id=1052 题目大意: 把1*1*1的小立方体通过粘接相邻面组成大的立方体的形状.如下图所示: 一层一层地堆叠,立方体从三个方向的投影会分别 ...

  6. 51Nod - 1242 斐波那契(快速幂)

    斐波那契数列的定义如下:   F(0) = 0 F(1) = 1 F(n) = F(n - 1) + F(n - 2) (n >= 2)   (1, 1, 2, 3, 5, 8, 13, 21, ...

  7. zabbix 告警 JXM

    告警 虚拟机上网 [root@test1 alertscripts]# route -n [root@test1 alertscripts]# route add default gw 172.25. ...

  8. Linux中apache服务

    httpd访问控制生成共享文件vim var/www/html/cq/index.html编辑配置文件 vim /etc/httpd/conf/httpd.conf<Directory &quo ...

  9. idea导入servlet项目

    转载:https://www.cnblogs.com/qiyebao/p/6236012.html

  10. SecureCRT 遇到一个致命的错误且必须关闭

    1.将报错路径中VanDyke文件夹内的东西删除掉2.运行regedit,在注册表中将HKEY_LOCAL_MACHINA中SOFTWARE里的VanDyke删除3.注册表中打开HKEY_CURREN ...