Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
selenium-test
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
黄夏豪
selenium-test
Commits
55e7c1e7
提交
55e7c1e7
authored
12月 03, 2021
作者:
mry
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(修改了测试的Jar包):修改了测试的Jar包
上级
ba7dc99e
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
16 行增加
和
7 行删除
+16
-7
ConferenceActive.java
...ple/seleniumtest/conferenceRoomTest/ConferenceActive.java
+16
-7
没有找到文件。
src/main/java/com/example/seleniumtest/conferenceRoomTest/ConferenceActive.java
浏览文件 @
55e7c1e7
...
@@ -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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论