zoukankan      html  css  js  c++  java
  • 如何调用一个数据完整的firefox浏览器

    通常我们调用firefox会使用以下的语句,但是打开的却是一个干净的firefox

    //调用firefox浏览器

    System.setProperty("webdriver.firefox.bin","C:\Program Files (x86)\Mozilla Firefox\Firefox.exe");
    WebDriver driver = new FirefoxDriver();

    如何调用一个数据完整的firefox,操作如下:

    1、win+R,打开运行;输入命令:firefox -ProfileManager

    2、进入“firefox-选择用户配置文件”,双击默认打开的配置文件,验证是否为具备完整数据的浏览器

    3、记住配置文件名,调用数据完整的firefox语句,如下:

    // 调用使用的firefox
    ProfilesIni profiles = new ProfilesIni();
    FirefoxProfile myprofile = profiles.getProfile("default");

    System.setProperty("webdriver.firefox.bin","C:\Program Files (x86)\Mozilla Firefox\Firefox.exe");
    WebDriver driver = new FirefoxDriver(myprofile);

  • 相关阅读:
    Android Lint简介
    免费HTTP数据抓包Fiddler2[4.6.1.2]以及显示中文包内容的方法
    IE6、7下bug
    图表插件
    学习:使用svg
    jQuery Transit
    jQuery基础学习笔记(1)
    HTTP协议详解学习
    html5学习笔记
    html释疑
  • 原文地址:https://www.cnblogs.com/Ashely/p/5623539.html
Copyright © 2011-2022 走看看