admin管理员组文章数量:1564637
Selenium作为网站UI测试利器,为黑盒功能测试人员所喜爱。
下载Selenium的最新版本地址:http://selenium-release.storage.googleapis/index.html
友情提示:如果一直下载不了,可能是浏览器与下载工具的没有兼容,或者没安装下载工具的插件。用IE浏览器打开,可以完整下载。如果没有这个问题就忽略。
时至今日,Selenium已经到了3.3.1版了(2017年3月7日)。
自从Selenium3发布以来,火狐浏览器(Selenium支持火狐的技术最为成熟,因为可以方便获取从而控制网页信息,也是测试人员最喜欢用的浏览器之一)成为了一个普遍的问题。
因为Selenium3不支持向前支持火狐浏览器了,40以后版本的火狐,运行会出现问题。
例如Java代码:(实现打开浏览器,输入"WebDriver",搜索后,关闭浏览器)
package com.selenium.test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class seleniumHello {
public static void main(String[] args) {
//如果火狐浏览器没有默认安装在C盘,需要自己确定其路径
System.setProperty("webdriver.fire
版权声明:本文标题:Selenium模拟操作浏览器(谷歌和火狐) 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/xitong/1727517562a1118526.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论