java
文章平均质量分 60
云的笔记
这个作者很懒,什么都没留下…
展开
-
Java滚动滑块
将滑块滚动至定位元素处:scrollToElementOfPage(WebElement element);原创 2020-03-17 13:46:23 · 139 阅读 · 0 评论 -
Java+seleuium元素的定位以及操作
1. 元素的定位Selenium自动化,我们需要做的最基本的事情就是在页面找到元素并通过脚本程序去操作这个元素,实现模拟人工操作。我们有多种定位元素的方式可以选择: 通过元素的ID定位元素: findElement(By.id(element)); 通过元素的名称定位元素: findElement(By...转载 2020-01-20 10:55:34 · 1457 阅读 · 1 评论 -
Java selenium验证下拉框内容
public void validateLMInterfaceBarcodeToMachine(){ String text = data.get(dataKey); System.out.println("input: "+text); String [] barcodeToMachine= text.split(";"); Str...原创 2020-01-20 10:45:41 · 191 阅读 · 0 评论 -
java+selenium元素统计下拉框选项个数
public void validateSelectLane() { try { Select select = new Select(driver.findElement(By.id("select"))); int number = select.getOptions().size();//下拉框选项个数 } ca...原创 2020-01-17 12:14:35 · 934 阅读 · 0 评论 -
java【selenium】拖拽页面元素
import static org.junit.jupiter.api.Assertions.*;import java.util.concurrent.TimeUnit;import org.junit.jupiter.api.AfterEach;import org.junit.jupiter.api.BeforeEach;import org.junit.jupiter.api....转载 2020-01-17 10:04:03 · 304 阅读 · 0 评论 -
java poi导出excel数据
private BaseDataEntity() { //TODO 此处通过poi将数据获取至initData 作为原始数据 XSSFWorkbook support = null; try { support = new XSSFWorkbook(new FileInputStream("/C:/Users/wshh/Des...原创 2019-12-27 15:12:20 · 109 阅读 · 0 评论 -
验证数据库中某条数据的某个值是否存在
public void validatePsqlReelDataElement () throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException, InterruptedException {// try { Thread.sleep(5000); String ...原创 2019-11-06 12:13:53 · 1537 阅读 · 0 评论 -
删除数据库数据
public void deletePsqlReelData() throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException { String text = data.get(dataKey); System.out.println("input " + text);...原创 2019-11-06 12:10:01 · 182 阅读 · 0 评论 -
在指定路径创建CSV文件
public void createcsvfile() throws IOException, InterruptedException { String text = data.get(dataKey); System.out.println("input " + text); String str[] = text.split(";"); String path = str[0...原创 2019-11-06 12:06:08 · 2219 阅读 · 0 评论 -
验证界面元素是否存在
public void validateelement() throws InterruptedException { String text = data.get(dataKey); System.out.println("input " + text); try { String element = driver.findElement(By.xpath(prop.getPr...原创 2019-11-06 12:02:14 · 176 阅读 · 0 评论 -
数据库查询数据出现次数
public void validatePsqlReelDataQuantity() throws SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException { String text = data.get(dataKey); System.out.println("input...原创 2019-11-06 12:00:32 · 1234 阅读 · 0 评论 -
Java数据库添加、修改和删除
都是用executeUpdate方法import java.sql.Connection;import java.sql.DriverManager;import java.sql.ResultSet;import java.sql.SQLException; import com.mysql.jdbc.Statement; public class JDbc { publ...转载 2019-10-25 13:44:31 · 2300 阅读 · 0 评论