SeleniumUI自动化测试版本兼容问题

    xiaoxiao2026-08-12  4

    selenium 2.53.1 firefox 47.0.1

    firefox 自带WebDriver,只需指定安装目录位置

    chrome需要自行下载ChromeDriver.

    /** * */ package com.luran.test; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; /** * @author luran * @date 2016-8-12 下午5:26:23 */ public class Test1 { public static void main(String[] args) { System.setProperty("webdriver.firefox.bin","D:\\Program Files\\Mozilla Firefox\\firefox.exe"); WebDriver driver = new FirefoxDriver(); driver.get("http://www.autohome.com.cn/car"); // 获取 网页的 title System.out.println("1 Page title is: " + driver.getTitle()); } }
    转载请注明原文地址: https://ju.6miu.com/read-1311100.html
    最新回复(0)