![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
selenium
「已注销」
这个作者很懒,什么都没留下…
展开
-
selenium的十大定位方法
selenium的十大定位方法By.id By.name By.className By.tagName By.LinkText By.xpath By.cssSeclector By.partialLinkText常见元素处理基本代码演示package com.test;import org.openqa.selenium.WebDriver;import...原创 2019-03-11 10:38:46 · 1250 阅读 · 0 评论 -
下拉框-选择元素
下拉框-选择元素具体演示代码如下package com.test.demo;import com.test.Init_Page;import org.openqa.selenium.WebElement;import org.openqa.selenium.support.FindBy;import org.openqa.selenium.support.ui.Select...原创 2019-03-11 14:17:58 · 1785 阅读 · 0 评论 -
selenium常用的鼠标操作
selenium常用的出表操作基本代码演示package com.test.demo;import com.test.Init_Page;import org.openqa.selenium.WebElement;import org.openqa.selenium.interactions.Actions;import org.openqa.selenium.suppor...原创 2019-03-11 15:05:54 · 302 阅读 · 1 评论 -
selenium特殊窗口切换
特殊窗口切换基本代码演示package com.test.demo;import org.openqa.selenium.WebElement;import org.openqa.selenium.support.FindBy;import org.testng.annotations.Test;import java.util.Set;/** * @author ...原创 2019-03-11 16:16:24 · 260 阅读 · 0 评论 -
selenium等待
1.pageLoadTimeout 设置页面加载超时时间://设定在加载页面时间为15秒,如果在加载时间还不能加载完页面那会抛出超时异常我们可以观察我们需要的元素加载的时间,之后就可以找到并处理了driver.manage().timeouts().pageLoadTimeout(15,TimeUnit.SECONDS);在15秒之后如果页面还没有加载完成则抛出超时异常;这时我们应该对...转载 2019-01-04 14:57:00 · 123 阅读 · 0 评论 -
selenium中quit()和close()的区别
首先我们先来看看两个方法的声明文档 /** * Close the current window, quitting the browser if it's the last window currently open. * 关闭当前窗口,如果它是当前打开的最后一个窗口,则退出浏览器 */ void close(); /** * Quits this dr...原创 2019-03-13 16:28:08 · 5991 阅读 · 0 评论