1、元素是否唯一

2、List定位和层级定位

3、CSS ID选择器查找元素

注意

  • 如果元素的ID不唯一,或者是动态的
  • 或者name和linketext的属性值也不唯一
  • 就要考虑用xpath来查找元素,然后再对元素执行操作

4、十大定位方式

可以参考这个,写的十分好
https://www.cnblogs.com/qingchunjun/p/4208159.html

  • By.id
  • By.name
  • By.tagName
  • By.className
  • By.linkText
  • By.partialLinkText
  • By.xpath
  • By.cssSeletor
  • List定位
  • 层级定位

5、单选框测试

源码如下:

public class SeleniumAction {public WebDriver driver;/*** 初始化驱动Driver*/public void initDriver() {System.setProperty("webdriver.chrome.driver", "E:\\chromedriver\\chromedriver_win32_2\\chromedriver.exe");ChromeOptions option = new ChromeOptions();//通过ChromeOptions的setExperimentalOption方法,传下面两个参数来禁止掉谷歌受自动化控制的信息栏option.setExperimentalOption("useAutomationExtension", false);option.setExperimentalOption("excludeSwitches", Collections.singletonList("enable-automation"));driver = new ChromeDriver(option);driver.manage().window().maximize();driver.get("https://www.imooc.com/user/setprofile");try {Thread.sleep(1500);} catch (InterruptedException e) {e.printStackTrace();}}/*** 登录页面的input*/public void inputElement() {//输入手机号或邮箱WebElement emailElement = driver.findElement(By.name("email"));//拿到placeholder里的值String userInfo = emailElement.getAttribute("placeholder");System.out.println(userInfo);//设置手机号emailElement.sendKeys("15088******");//设置登录密码driver.findElement(By.name("password")).sendKeys("********");//点击登录并进行跳转driver.findElement(By.className("moco-btn-red")).click();//让线程等1.5秒钟try {Thread.sleep(1500);} catch (InterruptedException e) {e.printStackTrace();}}/*** 个人信息界面修改*/public void radio() {driver.get("https://www.imooc.com/user/setprofile");try {Thread.sleep(1500);} catch (InterruptedException e) {e.printStackTrace();}driver.findElement(By.linkText("编辑")).click();try {Thread.sleep(2000);} catch (InterruptedException e) {e.printStackTrace();}//父节点WebElement userFrom = driver.findElement(By.id("profile"));//子节点List<WebElement> sexList = userFrom.findElements(By.name("sex"));//通过isSeleceted可以判断元素是否被选中for (WebElement sex : sexList) {if(sex.isSelected()){break;}else {sex.click();}}//获取第三个女的按钮sexList.get(2).click();try {Thread.sleep(1500);} catch (InterruptedException e) {e.printStackTrace();}}public static void main(String[] args) {SeleniumAction seleniumAction = new SeleniumAction();seleniumAction.initDriver();seleniumAction.inputElement();seleniumAction.radio();}
}

6、多选框测试

/*** 多选框*/public void checkBox(){WebElement box = driver.findElement(By.className("auto-cbx"));System.out.println(box.isSelected());System.out.println(box.isEnabled());try {Thread.sleep(1000);} catch (InterruptedException e) {e.printStackTrace();}box.click();try {Thread.sleep(2000);} catch (InterruptedException e) {e.printStackTrace();}driver.close();}
  public static void main(String[] args) {SeleniumAction seleniumAction = new SeleniumAction();seleniumAction.initDriver();seleniumAction.checkBox();}

7、button按钮

document.getElementsByClassName("moco-btn-red")[0].style.display="none";

执行此段代码前:

执行此段代码后:

/*** 登录按钮*/public void button() {WebElement loginBtn = driver.findElement(By.className("moco-btn-red"));System.out.println(loginBtn.isDisplayed());System.out.println(loginBtn.isEnabled());System.out.println("-------------");String jsString = "document.getElementsByClassName('moco-btn-red')[0].style.display='none'";JavascriptExecutor js = (JavascriptExecutor) driver;js.executeScript(jsString);WebElement loginBtn1 = driver.findElement(By.className("moco-btn-red"));System.out.println(loginBtn1.isDisplayed());System.out.println(loginBtn1.isEnabled());System.out.println("-------------");}

执行结果:

true
true
-------------
false
true
-------------

8、文件的上传(针对input类型的)

这里有2个坑,我使用的是模拟鼠标点击
Ⅰ、用的是Actions,而不是Action,Actions是位于Selenium里面的
Ⅱ、actions执行完moveToElement的时候,一定要进行perform进行提交,否则后面元素查找的时候会出现元素不可交互的错误
Message: element not interactable

/*** 文件上传(input类型)*/public void upFile(){driver.get("https://www.imooc.com/user/setprofile");//定位更换头像的元素WebElement headImg = driver.findElement(By.className("avator-mode"));//模拟鼠标移动,用Actions的形式,引入的是Selenium里面的Actions actions = new Actions(driver);//这里一定要给它perform提交actions.moveToElement(headImg).perform();//定位鼠标移动过后的更换头像WebElement changeImg = driver.findElement(By.className("js-avator-link"));changeImg.click();//放入照片driver.findElement(By.id("upload")).sendKeys("E:\\1\\3.jpg");try {Thread.sleep(3000);} catch (InterruptedException e) {e.printStackTrace();}driver.close();}

9、文件上传,均可以用(用模拟键盘来实现的)

/*** 文件上传(通过模拟键盘的ctrl+v+enter进行)*/public void upFileByKey(){driver.get("https://www.imooc.com/user/setprofile");//定位到更新头像的元素WebElement updateImg = driver.findElement(By.className("avator-mode"));//用Actions模拟点击,并通过perform提交Actions actions = new Actions(driver);actions.moveToElement(updateImg).perform();try {Thread.sleep(500);} catch (InterruptedException e) {e.printStackTrace();}//鼠标点击要更换头像driver.findElement(By.className("js-avator-link")).click();//鼠标点击上传头像driver.findElement(By.className("avator-btn-fake")).click();try {Thread.sleep(500);} catch (InterruptedException e) {e.printStackTrace();}//使用Ctrl+v+enter进行操作//1、选择图片的地址StringSelection selectJpg = new StringSelection("E:\\1\\3.jpg");Clipboard sysc = Toolkit.getDefaultToolkit().getSystemClipboard();sysc.setContents(selectJpg,null);//2、使用Robot进行Ctrl+v+enter操作try {Robot robot = new Robot();robot.keyPress(KeyEvent.VK_CONTROL);robot.keyPress(KeyEvent.VK_V);robot.keyRelease(KeyEvent.VK_V);robot.keyRelease(KeyEvent.VK_CONTROL);try {Thread.sleep(2000);} catch (InterruptedException e) {e.printStackTrace();}robot.keyPress(KeyEvent.VK_ENTER);robot.keyRelease(KeyEvent.VK_ENTER);try {Thread.sleep(1000);} catch (InterruptedException e) {e.printStackTrace();}} catch (AWTException e) {e.printStackTrace();}try {Thread.sleep(3000);} catch (InterruptedException e) {e.printStackTrace();}driver.close();}

10、下拉框的选中显示

 /*** 下拉列表显示*/public void selectOption(){driver.get("https://www.imooc.com/user/setprofile");driver.findElement(By.className("js-edit-info")).click();try {Thread.sleep(500);} catch (InterruptedException e) {e.printStackTrace();}WebElement userForm = driver.findElement(By.id("profile"));userForm.findElement(By.id("job")).click();//这里是用userFrom去查询,不能通过driver去查询,否则数据重复性会很多List<WebElement> jobList = userForm.findElements(By.tagName("option"));//点击职位名称jobList.get(6).click();try {Thread.sleep(5000);} catch (InterruptedException e) {e.printStackTrace();}driver.close();}

11、下拉框选中显示,使用自带的Select方法

11.1、下拉框操作

  • 选择对应的元素
  • 不选择对应的元素
  • 获取选择项的值

11.2、实现的代码

    /*** 下拉框显示(通过Selenium自带的Select方法进行选择,不通过自己进行封装)*/public void selectOptionSelenium(){driver.get("https://www.imooc.com/user/setprofile");//点击编辑按钮driver.findElement(By.className("js-edit-info")).click();try {Thread.sleep(500);} catch (InterruptedException e) {e.printStackTrace();}//定位弹弹框中的职位WebElement userFrom = driver.findElement(By.id("profile"));WebElement jobList = userFrom.findElement(By.name("job"));//用Selenium自带的select进行处理Select select = new Select(jobList);//通过index的形式//select.selectByIndex(6);//通过value的形式select.selectByValue("11");try {Thread.sleep(3000);} catch (InterruptedException e) {e.printStackTrace();}select.selectByVisibleText("产品经理");try {Thread.sleep(5000);} catch (InterruptedException e) {e.printStackTrace();}driver.close();}

12、元素进阶(Actions,鼠标事件)

  • 鼠标左击
 Actions actions = new Actions(driver);//鼠标左击actions.click().perform();
  • 鼠标右击
 Actions actions = new Actions(driver);//鼠标右击actions.contextClick().perform();
  • 鼠标悬停
 Actions actions = new Actions(driver);//鼠标悬停actions.moveToElement(jobList).perform();

实现的代码

    /*** 模拟鼠标移动*/public void moseAction(){driver.get("https://www.imooc.com/");//用层级定位,定位出大的div,再定位小的divWebElement menuContent = driver.findElement(By.className("menuContent"));//找到大的div后,还会出现很多items,还是得用findElements来进行List<WebElement> items = menuContent.findElements(By.className("item"));//选择第二个,也就是索引是1的WebElementWebElement mobileElement = items.get(1);//模拟鼠标悬停,用Actions,最后再perform提交Actions actions = new Actions(driver);actions.moveToElement(mobileElement).perform();driver.findElement(By.linkText("小程序")).click();try {Thread.sleep(5000);} catch (InterruptedException e) {e.printStackTrace();}driver.close();}

13、窗体分类

  • iframe
    使用switchTo()
  • 弹窗
    使用switchTo()和getWindowHandles()来处理
  • 浏览器多窗口

13.1、iframe实践

 /*** iframe进行操作,一些内嵌页面上面可能会有*/public void switchIframe(){driver.get("https://www.imooc.com/article/publish#");WebElement iframeElement = driver.findElement(By.id("ueditor_0"));driver.switchTo().frame(iframeElement);WebElement editor = driver.findElement(By.tagName("p"));Actions moueseActions = new Actions(driver);moueseActions.moveToElement(editor).click().sendKeys("This is text").perform();try {Thread.sleep(5000);} catch (InterruptedException e) {e.printStackTrace();}driver.close();}

13.2 浏览器多窗口

/*** 多窗口的切换*/public void windowsHandle(){driver.get("https://coding.imooc.com/?c=miniprogram");//拿到所有的窗口Set<String> windowHandles = driver.getWindowHandles();//拿到当前的窗口String currentWindow = driver.getWindowHandle();//遍历所有的窗口,和当前的窗口进行对比for(String s : windowHandles){if(s.equals(currentWindow)){continue;}else {//切换到window当前的页面driver.switchTo().window(s);}}driver.findElements(By.className("shizhan-course-wrap")).get(1).click();try {Thread.sleep(5000);} catch (InterruptedException e) {e.printStackTrace();}driver.close();}

13.3 浏览器多个弹窗

 /*** 弹窗的操作*/public void alertWindows(){driver.get("********弹窗的网址********");//第一个就是普通的弹窗driver.findElement(By.id("firstAlert")).click();//网页弹出消息显示和确认按钮,通过switchTo里面的alert弹窗,然后选择accept也就是接受driver.switchTo().alert().accept();//第二个弹框的话,消息加一个取消和确认的按钮,点击确定或取消的话,进入对应的页面,这里要进行页面刷新driver.findElement(By.id("secondAlert")).click();//取消就是dismiss,确认就是acceptdriver.switchTo().alert().dismiss();//页面刷新driver.navigate().refresh();//第三个弹框的话,是里面要输入一些文字,然后进行对应的页面driver.findElement(By.className("thirdAlert")).click();driver.switchTo().alert().sendKeys("hello hws");//页面刷新driver.navigate().refresh();driver.close();}

14、3种不同形式的等待

  • 强制等待:Thread.sleep
  • 显示等待:不用等太长时间
  • 隐式等待:全局进行等待
    也可以看这个链接
    https://blog.csdn.net/woshiweiweily/article/details/103408847

代码如下:

/*** 3种不同形式的等待*/public void waitWeb(){//1、强制等待,强制等待0.5秒后,进行下一步操作;缺点:不能准确把握需要等待的时间try {Thread.sleep(500);} catch (InterruptedException e) {e.printStackTrace();}//2、显示等待,判断准确,不会浪费多余的等待时间;缺点:使用相对比较复杂WebDriverWait webDriverWait = new WebDriverWait(driver, 10);webDriverWait.until(ExpectedConditions.presenceOfElementLocated(By.id("needID")));//3、隐式等待,优点:隐式等待对整个driver的周期都起作用;缺点:不是很灵活driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);}

15、Selenium工作原理

比较常用css或者xpath定位(适合Web)

16、登录的需求

  • 逻辑分析

17、IDEA 内的Selenium配置

<dependencies><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.11</version><scope>test</scope></dependency><dependency><groupId>org.apache.maven.plugins</groupId><artifactId>maven-project-info-reports-plugin</artifactId><version>3.0.0</version></dependency><dependency><groupId>org.seleniumhq.selenium</groupId><artifactId>selenium-java</artifactId><version>3.14.0</version></dependency><!-- 与 selenium-java 版本要一致 --><dependency><groupId>org.seleniumhq.selenium</groupId><artifactId>selenium-api</artifactId><version>3.14.0</version></dependency></dependencies>

18、重构登录脚本

/*** 实现登录*/public void userLogin() {String userGetBy = "name";String userElement = "email";String userName = "********";String pwdGetBy = "name";String pwdElement = "password";String password = "************";String loginGetBy = "className";String loginElement = "moco-btn-red";driver.findElement(By.id("js-signin-btn")).click();try {Thread.sleep(500);} catch (InterruptedException e) {e.printStackTrace();}driver.findElement(this.getByLocal(userGetBy,userElement)).sendKeys(userName);driver.findElement(this.getByLocal(pwdGetBy,pwdElement)).sendKeys(password);driver.findElement(this.getByLocal(loginGetBy,loginElement)).click();try {Thread.sleep(1500);} catch (InterruptedException e) {e.printStackTrace();}//校验WebElement headPng = driver.findElement(By.id("header-avator"));Actions actions = new Actions(driver);actions.moveToElement(headPng).perform();String text = driver.findElement(By.className("text-ellipsis")).getText();try {if ("*****userName****".equals(text)) {System.out.println("登录成功");} else {System.out.println("登录信息不匹配" + text);}}catch (Exception e){System.out.println("登录失败");}        }/*** 对获取的方式进行封装(重构)*/public By getByLocal(String getBy, String getValue) {if ("id".equals(getBy)) {return By.id(getValue);} else if ("className".equals(getBy)) {return By.className(getValue);} else if ("name".equals(getBy)) {return By.name(getValue);}return By.xpath(getValue);}

19、读取配置文件

用properties来读取

  • load
  • setProperties
  • getProperties
    实现代码
public class ProUtil {public static void main(String[] args) {Properties properties = new Properties();FileInputStream fileInputStream = null;try {fileInputStream = new FileInputStream("element.properties");BufferedInputStream inputStream = new BufferedInputStream(fileInputStream);try {properties.load(inputStream);String username = properties.getProperty("username");System.out.println(username);} catch (IOException e) {e.printStackTrace();}} catch (FileNotFoundException e) {e.printStackTrace();}}
}

20、重构读取配置文件

public class ProUtil {public Properties pro;public ProUtil(String filePath){pro = readProperties(filePath);}private Properties readProperties(String filePath){Properties properties = new Properties();try {FileInputStream fileInputStream = new FileInputStream(filePath);BufferedInputStream inputStream = new BufferedInputStream(fileInputStream);try {properties.load(inputStream);} catch (IOException e) {e.printStackTrace();}} catch (FileNotFoundException e) {e.printStackTrace();}return properties;}private String getPro(String key){if(pro.containsKey(key)){String value = pro.getProperty(key);return value;}return "";}public static void main(String[] args) {ProUtil proUtil = new ProUtil("element.properties");String username = proUtil.getPro("username");System.out.println(username);}
}

21、testNG

  • 安装testNG框架
    http://www.mamicode.com/info-detail-2899087.html
    https://www.cnblogs.com/54tester/p/11518263.html
    https://blog.csdn.net/u010270891/article/details/82978260
  • 学习testNG感觉这个写得也还不错
    https://www.bbsmax.com/A/B0zqQGeGzv/
    http://www.51testing.com/zhuanti/TestNG.htm
  • IDEA使用
    Ⅰ、引入plugin里面的testNG.xml 2020/03/26去idea的plugin里面搜索的时候只有testNG.xml了,就把它引入就可以了
    Ⅱ、引入testNG-j插件,下载地址 https://plugins.jetbrains.com/plugin/137-testng-j
    Ⅲ、安装testNG依赖,maven那里下载即可


22、testNG执行顺序

beforeTest -> beforeClass -> beforeMethod -> test -> AfterMethod -> AfterClass -> AfterTest

23、testNG 报错

Cannot inject @Test annotated Method [userLogin] with [class java.lang.String].
原因:@Test注解的方法不能带参数
解决方法 :去掉参数后,再执行,就没再报错了。

24、可以选择从user.properties里面找多个用户信息并登录

实现的代码如下:

public class TestCase {public WebDriver driver;@BeforeTestpublic void beforeTest(){System.out.println("beforeTest");}/*** 初始化驱动Driver*/@BeforeClasspublic void initDriver() {System.setProperty("webdriver.chrome.driver", "E:\\chromedriver\\chromedriver_win32_2\\chromedriver.exe");ChromeOptions option = new ChromeOptions();//通过ChromeOptions的setExperimentalOption方法,传下面两个参数来禁止掉谷歌受自动化控制的信息栏option.setExperimentalOption("useAutomationExtension", false);option.setExperimentalOption("excludeSwitches", Collections.singletonList("enable-automation"));driver = new ChromeDriver(option);driver.manage().window().maximize();driver.get("https://www.imooc.com/user/newlogin");try {Thread.sleep(1000);} catch (InterruptedException e) {e.printStackTrace();}}/*** 对获取的方式进行封装(重构)*/public By getByLocal(String key) {ProUtil proUtil = new ProUtil("element.properties");//下面的getPro(key)得到的是这一串name>email,用split给它分隔开String locator = proUtil.getPro(key);String locatorBy = locator.split(">")[0];String locatorValue = locator.split(">")[1];if ("id".equals(locatorBy)) {return By.id(locatorValue);} else if ("className".equals(locatorBy)) {return By.className(locatorValue);} else if ("name".equals(locatorBy)) {return By.name(locatorValue);}return By.xpath(locatorValue);}/*** 对driver进行封装,并将ProUtil工具类引入*/public WebElement getElement(String key) {WebElement element = driver.findElement(this.getByLocal(key));return element;}/*** 测试实现登录*/@Testpublic void userLogin() {String user = null;String userName;String passWord;try {Thread.sleep(500);} catch (InterruptedException e) {e.printStackTrace();}//用之前的工具类获取username和passwordProUtil proUtil = new ProUtil("user.properties");int lines = proUtil.getLines();for (int i = 0; i < lines; i++) {user = proUtil.getPro("user" + i);userName = user.split(">")[0];passWord = user.split(">")[1];WebElement usernameElement = getElement("username");usernameElement.sendKeys(userName);WebElement passwordElement = getElement("password");passwordElement.sendKeys(passWord);getElement("loginbtn").click();try {Thread.sleep(1500);} catch (InterruptedException e) {e.printStackTrace();}//校验try {WebElement headPng = getElement("headpng");Actions actions = new Actions(driver);actions.moveToElement(headPng).perform();String text = getElement("userinfo").getText();if ("***登录后的用户名***".equals(text)) {System.out.println("登录成功");} else {System.out.println("登录信息不匹配" + text);}} catch (Exception e) {System.out.println("登录失败");}//下次执行的时候,这里的输入框要清空usernameElement.clear();passwordElement.clear();}}@AfterMethodpublic void AfterMethod(){System.out.println("AfterMethod");}@AfterClasspublic void AfterClass(){try {Thread.sleep(5000);} catch (InterruptedException e) {e.printStackTrace();}driver.close();}@AfterTestpublic void AfterTest(){System.out.println("AfterTest");}
}

25、实现截图

  • 首先的话,要确定文件的名称和文件放置的路径
  • 然后选用Files.copy,用的是common.io里面的,有fileForm和fileTo
    实现的代码如下:
    实现代码一:
 /*** 实现截图* 1、图片的名字 2、图片存的路径*/public void takeScreenShot(Integer i) {String screenFilePath = "E:\\IDEA_WorkSpace\\test8\\screenFile\\user(" + i + ")login.png";File screenFile = ((RemoteWebDriver) driver).getScreenshotAs(OutputType.FILE);ProUtil proUtil = new ProUtil("user.properties");//注意,这个的Files用的是import com.google.common.io.Files;这个下面的,也可以看提示,有fileFrom和fileTotry {assert screenFilePath != null;Files.copy(screenFile, new File(screenFilePath));} catch (IOException e) {e.printStackTrace();}}

实现代码二:

     /*** 实现截图* 1、图片的名字 2、图片存的路径(当前类名+当前时间+png)*/public void takeScreenShot() {//格式化然后获得当前的时间SimpleDateFormat sdf = new SimpleDateFormat("yyyy_MM_dd_HH_mm_ss");String currentTime = sdf.format(new Date());//获得当前的类名的名字String currentClass = this.getClass().getName();//整合成最终图片的名字String imgPath = currentClass + currentTime + ".png";//获取存放当前所有图片的文件路径(或者说是这个项目路径下面的某一个文件夹)String currentPath = "E:\\IDEA_WorkSpace\\test8\\screenFile\\";String finalImgPath = currentPath + imgPath;File screenFile = ((RemoteWebDriver) driver).getScreenshotAs(OutputType.FILE);ProUtil proUtil = new ProUtil("user.properties");//注意,这个的Files用的是import com.google.common.io.Files;这个下面的,也可以看提示,有fileFrom和fileTotry {Files.copy(screenFile, new File(finalImgPath));} catch (IOException e) {e.printStackTrace();}}

26、testTG实现监听以及代码实现

  • 首先建立一个testTG的class的文件,去继承TestListenerAdapter,
  • 然后先super父类的onTestFailure,写上要输出的语句
  • 最后添加监听@Listener(TestListenerScreen.class)
    实现的代码
public class TestNGListenerScreen extends TestListenerAdapter {@Overridepublic void onTestFailure(ITestResult var1) {super.onTestFailure(var1);System.out.println("第一个case失败执行的");}}
@Listeners({TestNGListenerScreen.class})
public class OneTestCase {

Selenium(上)相关推荐

  1. selenium 上传下载调用windows窗口--AutoIT

    AutoIT解决自动化上传下载文件调用Windows窗口 AutoIT 下载安装 使用AotuIt 操作windows上传窗口 1. 打开AutoIt定位窗口组件 2. 定位上传窗口属性 (鼠标选中F ...

  2. python+selenium 上传文件方法

    input上传: 找到对应的元素,使用send_keys('filePath')即可: 例: #上传封面图 webDriver.find_element(By.NAME,'file').send_ke ...

  3. selenium上传文件方法

    从网上资料查看,有两种方法可上传文件 1.无需借助第三方工具即可上传,但文件类型须是以下类型才可以 file类型 定位元素即可直接上传文件 2.需要借助第三方工具Autolt,下载安装好此工具,如何获 ...

  4. 论Java selenium 上传文件,图片的正确姿势

    参考一 [转载自YunMan](https://www.cnblogs.com/yunman/p/7112882.html?utm_source=itdadao&utm_medium=refe ...

  5. selenium自动化测试_您如何使用Selenium来计算自动化测试的投资回报率?

    selenium自动化测试 跨浏览器测试是一种测试,需要大量的精力和时间. 通过不同的浏览器,操作系统,设备,屏幕分辨率测试Web应用程序,以评估针对各种受众的Web内容呈现的过程是一项活动. 特别是 ...

  6. Selenium两万字大题库

    测试最流行框架之一,可以学习一下. 填空 1.根据项目流程阶段划分软件测试:(单元测试).(集成测试).(系统测试).(验收测试) (单元测试)对程序中的单个子程序或具有独立功能的代码段进行测试的过程 ...

  7. 自动化比手工测试成本高?使用Selenium评估测试自动化的ROI指标

    跨浏览器测试是一种测试,需要大量的精力和时间.通过不同的浏览器,操作系统,设备,屏幕分辨率测试Web应用程序,以评估针对各种受众的Web内容呈现的过程是一项活动. 特别是如果手动处理,使用Seleni ...

  8. 资深和新手的100大 Selenium面试问答

    下面的Java Selenium问题指南涵盖了100个最重要的Selenium自动化面试问题,包括简单的Selenium Java面试问题以及带答案的Selenium自动化测试面试问题.本文包含了面向 ...

  9. 手把手Selenium安装使用及实战爬取前程无忧招聘网站(一)

    目录 一.安装浏览器驱动器 1. 下载驱动器 2. 启动驱动器 二 .selenium的使用 1. 启动驱动器加载网页 2. 八大元素定位 (1)id 定位 (2)name定位 (3)link_tex ...

  10. Selenium自动化测试的【投资回报率】还能这样计算

             目录:导读 前言 使用Selenium评估测试自动化的ROI的指标 Selenium测试自动化的范围 您将节省多少时间? 您的资源带宽 资源和工具的投资预算 总缺陷数 缺陷质量 在测 ...

最新文章

  1. Linux计划任务与压缩归档
  2. 你为何如此优秀?| 神策数据 2018 年获奖集锦
  3. apt-get clean 清除 apt 的缓存
  4. 电感检测_三、电感线圈的识别与检测(二)
  5. 设置中文linux输入ubuntu,Linux_ubuntu怎么设置成中文?ubuntu中文设置图文方法,  很多朋友安装ubuntu后,发 - phpStudy...
  6. 聊聊excel生成图片的几种方式
  7. 对HGE游戏引擎的一次封装
  8. Python常用画图代码(折线图、柱状图、饼图)
  9. puppet详解(九)——puppet项目实战
  10. Atitit 中间件之道 attilax著 1. 第1章 中间件产生背景及分布式计算环境 2 2. 中间件分类 3 2.1. 商业中间件:weblogic,was,conherence 开源中间
  11. VScode如何在浏览器中打开html文件
  12. matlab 泊松分布作图,matlab用一组数据画泊松分布图
  13. 使用spark-md5获取文件md5值
  14. 跟同事关系再好,这3种话宁烂肚里也别张嘴,莫让福运悄悄离开你
  15. XMU 1615 刘备闯三国之三顾茅庐(三) 【欧拉函数+快速幂+欧拉定理】
  16. 百度 BAE 项目部署
  17. 用计算机rap歌词,Rap歌词
  18. vue3+tsx封装组件
  19. spring boot 整合 ip2region(ip地址库)
  20. 基于python的论文摘要怎么写_Django显示文章摘要需要如何写

热门文章

  1. Win7开机登陆密码的破解
  2. SQL Server类型转换方法
  3. 深度学习与视频编解码算法一
  4. 绝缘栅型场效应管的结构、特性、参数
  5. 最新版vagrant_2.2.7_x86_64 window版本分享
  6. securecrt9.2安装包带注册机
  7. 求解填数字游戏问题(DFS回溯)
  8. android Palette使用详解
  9. Python数据可视化:如何创建箱线图
  10. Unity【超级马里奥】游戏素材+源码