提交 55e7c1e7 authored 作者: mry's avatar mry

fix(修改了测试的Jar包):修改了测试的Jar包

上级 ba7dc99e
...@@ -4,10 +4,10 @@ import com.example.seleniumtest.selenium.enums.Browser; ...@@ -4,10 +4,10 @@ import com.example.seleniumtest.selenium.enums.Browser;
import com.example.seleniumtest.selenium.util.WebDriverUtil; import com.example.seleniumtest.selenium.util.WebDriverUtil;
import lombok.Data; import lombok.Data;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.junit.Assert;
import org.openqa.selenium.*; import org.openqa.selenium.*;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.testng.Assert;
import org.testng.Reporter; import org.testng.Reporter;
import org.testng.annotations.AfterClass; import org.testng.annotations.AfterClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
...@@ -25,7 +25,6 @@ public class ConferenceActive { ...@@ -25,7 +25,6 @@ public class ConferenceActive {
private String baseUrl; private String baseUrl;
private WebDriver webDriver = WebDriverUtil.getWebDriver(Browser.FIREFOX, false); private WebDriver webDriver = WebDriverUtil.getWebDriver(Browser.FIREFOX, false);
;
//失败截图 //失败截图
public void file() { public void file() {
...@@ -79,7 +78,7 @@ public class ConferenceActive { ...@@ -79,7 +78,7 @@ public class ConferenceActive {
} }
//新增全空的提示信息,失败 //新增全空的提示信息,失败
@Test(description = "新增空数据会议") @Test(description = "都为空的新增")
public void insertConferenceRoomFailAll() { public void insertConferenceRoomFailAll() {
try { try {
toManager(); toManager();
...@@ -107,7 +106,7 @@ public class ConferenceActive { ...@@ -107,7 +106,7 @@ public class ConferenceActive {
} }
//单独不选择规模,失败 //单独不选择规模,失败
@Test(description = "新增不选择规模会议") @Test(description = "不选规模的新增")
public void insertConferenceRoomOne() { public void insertConferenceRoomOne() {
try{ try{
toManager(); toManager();
...@@ -179,7 +178,7 @@ public class ConferenceActive { ...@@ -179,7 +178,7 @@ public class ConferenceActive {
} }
//会议室查询 //会议室查询
@Test(description = "查询功能") @Test(description = "会议室查询")
public void findConferenceRoom() { public void findConferenceRoom() {
try{ try{
toManager(); toManager();
...@@ -201,6 +200,8 @@ public class ConferenceActive { ...@@ -201,6 +200,8 @@ public class ConferenceActive {
} }
//查 //查
find.click(); find.click();
//清除 //清除
clear.click(); clear.click();
//容纳人数 //容纳人数
...@@ -210,6 +211,8 @@ public class ConferenceActive { ...@@ -210,6 +211,8 @@ public class ConferenceActive {
number.sendKeys("100"); number.sendKeys("100");
//查 //查
find.click(); find.click();
//清除 //清除
clear.click(); clear.click();
//小型 //小型
...@@ -217,18 +220,24 @@ public class ConferenceActive { ...@@ -217,18 +220,24 @@ public class ConferenceActive {
webDriver.findElement(By.xpath("/html/body/div[1]/div/div/div[3]/div/div[1]/div/form/div/div[3]/div/div/div/div/span/span/i")).click(); webDriver.findElement(By.xpath("/html/body/div[1]/div/div/div[3]/div/div[1]/div/form/div/div[3]/div/div/div/div/span/span/i")).click();
webDriver.findElement(By.xpath("/html/body/div[3]/div[1]/div[1]/ul/li[1]/span")).click(); webDriver.findElement(By.xpath("/html/body/div[3]/div[1]/div[1]/ul/li[1]/span")).click();
find.click(); find.click();
clear.click(); clear.click();
//中型 //中型
//规模 //规模
webDriver.findElement(By.xpath("/html/body/div[1]/div/div/div[3]/div/div[1]/div/form/div/div[3]/div/div/div/div/span/span/i")).click(); webDriver.findElement(By.xpath("/html/body/div[1]/div/div/div[3]/div/div[1]/div/form/div/div[3]/div/div/div/div/span/span/i")).click();
webDriver.findElement(By.xpath("/html/body/div[3]/div[1]/div[1]/ul/li[2]/span")).click(); webDriver.findElement(By.xpath("/html/body/div[3]/div[1]/div[1]/ul/li[2]/span")).click();
find.click(); find.click();
clear.click(); clear.click();
//大型 //大型
//规模 //规模
webDriver.findElement(By.xpath("/html/body/div[1]/div/div/div[3]/div/div[1]/div/form/div/div[3]/div/div/div/div/span/span/i")).click(); webDriver.findElement(By.xpath("/html/body/div[1]/div/div/div[3]/div/div[1]/div/form/div/div[3]/div/div/div/div/span/span/i")).click();
webDriver.findElement(By.xpath("/html/body/div[3]/div[1]/div[1]/ul/li[3]/span")).click(); webDriver.findElement(By.xpath("/html/body/div[3]/div[1]/div[1]/ul/li[3]/span")).click();
find.click(); find.click();
clear.click(); clear.click();
} catch (Exception | Error e) { } catch (Exception | Error e) {
file(); file();
...@@ -237,7 +246,7 @@ public class ConferenceActive { ...@@ -237,7 +246,7 @@ public class ConferenceActive {
} }
//查询错误人数 //查询错误人数
@Test(description = "人数输入非数字时,提示:请输入数字") @Test(description = "查询错误人数")
public void findConferenceRoomNumber() { public void findConferenceRoomNumber() {
try { try {
toManager(); toManager();
...@@ -255,7 +264,7 @@ public class ConferenceActive { ...@@ -255,7 +264,7 @@ public class ConferenceActive {
} }
//会议室删除 成功删除案例 //会议室删除 成功删除案例
@Test(description = "会议室删除,提示:删除会议室成功") @Test(description = "会议室删除")
public void deleteConferenceRoom() { public void deleteConferenceRoom() {
try{ try{
toManager(); toManager();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论