使用

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. mongoDB副本集+分片集群

    首先搭建一个副本集(三台机器) 主,从,仲裁 然后搭建分片shard1,在每台机子上启用shard1(这里就写一个分片吧!!如果写多了怕初学者会混乱,先写一个.然后可以按照同样的方法写第二个,第三个) ...

  2. VS2010 简单ATL COM开发

    http://blog.csdn.net/wangwenjing90/article/details/8771934#reply http://blog.csdn.net/wangwenjing90/ ...

  3. 圆环进度css

    看效果先:http://sandbox.runjs.cn/show/b6bmksvn 参考: jquery圆环百分比进度条制作 CSS clip:rect矩形剪裁功能及一些应用介绍 CSS clip: ...

  4. Python判断字符串编码以及编码的转换

    转自:http://www.cnblogs.com/zhanhg/p/4392089.html Python判断字符串编码以及编码的转换 判断字符串编码: 使用 chardet 可以很方便的实现字符串 ...

  5. 钉钉jsapi免登获取code中,出现对应企业没有某域名微应用

    在使用jsapi中.出现 {"errorMessage":"对应企业没有某域名微应用",:"errorCode":"3" ...

  6. P3272 [SCOI2011]地板(插头DP)

    [题面链接] https://www.luogu.org/problemnew/show/P3272 [题目描述] 有一个矩阵,有些点必须放,有些点不能放,用一些L型的图形放满,求方案数 [题解] ( ...

  7. SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape错误原因及解决方法

    用Python打开文件: with open('C:\Users\PINPIN\test\file1.txt','r') as f2: pass 运行后直接就报错了: File "<i ...

  8. 查看正在运行的sql

    SELECT [Spid] = session_id ,ecid ,[Database] = DB_NAME(sp.dbid) ,[User] = nt_username ,[Status] = er ...

  9. c++ for_each( )学习

    for_each()事实上是個 function template,其实质如下  [effective STL item 41] template<typename InputIterator, ...

  10. Python开源库

    某些情况下,pip install xxx找不到,而且在 官方库 也找不到. 那么 第三方库 就派上用场了.