Commit c98c375ee5ccd5da4731eb8ec0655a2fb266fe4b
1 parent
60b8852f
all
Showing
277 changed files
with
7303 additions
and
2072 deletions
Show diff stats
Too many changes.
To preserve performance only 100 of 277 files are displayed.
Log/20180404_171835.log deleted
Log/20180404_172707.log deleted
... | ... | @@ -1,28 +0,0 @@ |
1 | -2018-04-04 17:27:07.424 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-04 17:27:07.439 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-04 17:27:07.439 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-04 17:27:18.932 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-04 17:27:20.474 INFO: 窗口最大化 | |
6 | -2018-04-04 17:27:25.129 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-04 17:27:25.154 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-04 17:27:25.626 INFO: 清除文本框中已有字符: //*[@id='username']] | |
9 | -2018-04-04 17:27:25.887 INFO: 输入的字符是:admin | |
10 | -2018-04-04 17:27:26.000 INFO: 清除文本框中已有字符: //*[@id='password']] | |
11 | -2018-04-04 17:27:26.154 INFO: 输入的字符是:essa123 | |
12 | -2018-04-04 17:27:34.439 ERROR: 1. | |
13 | -2018-04-04 17:27:34.837 INFO: 点击元素: //*[text()='供应商管理']] | |
14 | -2018-04-04 17:27:39.876 ERROR: no such element: Unable to locate element: {"method":"xpath","selector":"//*/a[contains(text(),'平台运营跟进管理')]"} | |
15 | - (Session info: chrome=65.0.3325.181) | |
16 | - (Driver info: chromedriver=2.37.543627 (63642262d9fb93fb4ab52398be4286d844092a5e),platform=Windows NT 10.0.10586 x86) (WARNING: The server did not provide any stacktrace information) | |
17 | -Command duration or timeout: 5.02 seconds | |
18 | -For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html | |
19 | -Build info: version: '2.46.0', revision: '61506a4624b13675f24581e453592342b7485d71', time: '2015-06-04 10:22:50' | |
20 | -System info: host: 'DESKTOP-NIGE62D', ip: '10.0.2.15', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_144' | |
21 | -Driver info: org.openqa.selenium.chrome.ChromeDriver | |
22 | -Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.37.543627 (63642262d9fb93fb4ab52398be4286d844092a5e), userDataDir=C:\Users\jin\AppData\Local\Temp\scoped_dir3436_21321}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=65.0.3325.181, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=false, acceptInsecureCerts=false, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=}] | |
23 | -Session ID: 9a5890016096ab721e6f083fec63e551 | |
24 | -*** Element info: {Using=xpath, value=//*/a[contains(text(),'平台运营跟进管理')]}. | |
25 | -2018-04-04 17:27:40.080 INFO: 检查元素是否存在:true | |
26 | -2018-04-04 17:27:40.142 INFO: 获取所要读取的文件 | |
27 | -2018-04-04 17:27:41.720 INFO: 文件为:.xlsx格式 | |
28 | -2018-04-04 17:27:41.752 INFO: 读取文件成功 |
Log/20180404_172957.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-04 17:29:57.032 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-04 17:29:57.032 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-04 17:29:57.032 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-04 17:30:01.505 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-04 17:30:03.032 INFO: 窗口最大化 | |
6 | -2018-04-04 17:30:05.808 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-04 17:30:05.857 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-04 17:30:05.972 INFO: 获取所要读取的文件 | |
9 | -2018-04-04 17:30:07.251 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-04 17:30:07.255 INFO: 读取文件成功 | |
11 | -2018-04-04 17:30:07.438 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-04 17:30:07.631 INFO: 输入的字符是:admin | |
13 | -2018-04-04 17:30:07.744 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-04 17:30:07.896 INFO: 输入的字符是:essa123 | |
15 | -2018-04-04 17:30:15.235 ERROR: 1. | |
16 | -2018-04-04 17:30:15.329 INFO: 判断检查点是否存在 | |
17 | -2018-04-04 17:30:21.626 ERROR: 1. | |
18 | -2018-04-04 17:30:21.954 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-04 17:30:22.162 INFO: 输入的字符是:linrong | |
20 | -2018-04-04 17:30:22.413 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-04 17:30:22.608 INFO: 输入的字符是:essa123 | |
22 | -2018-04-04 17:30:30.282 ERROR: 1. | |
23 | -2018-04-04 17:30:30.329 INFO: 判断检查点是否存在 | |
24 | -2018-04-04 17:30:36.485 ERROR: 1. |
Log/20180404_174033.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-04 17:40:33.264 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-04 17:40:33.264 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-04 17:40:33.264 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-04 17:40:37.858 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-04 17:40:39.370 INFO: 窗口最大化 | |
6 | -2018-04-04 17:40:41.876 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-04 17:40:41.888 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-04 17:40:41.990 INFO: 获取所要读取的文件 | |
9 | -2018-04-04 17:40:43.249 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-04 17:40:43.264 INFO: 读取文件成功 | |
11 | -2018-04-04 17:40:43.456 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-04 17:40:43.651 INFO: 输入的字符是:admin | |
13 | -2018-04-04 17:40:43.788 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-04 17:40:43.965 INFO: 输入的字符是:essa123 | |
15 | -2018-04-04 17:40:51.827 ERROR: 1. | |
16 | -2018-04-04 17:40:51.920 INFO: 判断检查点是否存在 | |
17 | -2018-04-04 17:40:58.155 ERROR: 1. | |
18 | -2018-04-04 17:40:58.300 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-04 17:40:58.465 INFO: 输入的字符是:linrong | |
20 | -2018-04-04 17:40:58.583 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-04 17:40:58.735 INFO: 输入的字符是:essa123 | |
22 | -2018-04-04 17:41:06.217 ERROR: 1. | |
23 | -2018-04-04 17:41:06.296 INFO: 判断检查点是否存在 | |
24 | -2018-04-04 17:41:12.685 ERROR: 1. |
Log/20180404_180230.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-04 18:02:30.274 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-04 18:02:30.290 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-04 18:02:30.290 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-04 18:02:34.212 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-04 18:02:35.688 INFO: 窗口最大化 | |
6 | -2018-04-04 18:02:38.118 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-04 18:02:38.137 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-04 18:02:38.216 INFO: 获取所要读取的文件 | |
9 | -2018-04-04 18:02:39.212 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-04 18:02:39.231 INFO: 读取文件成功 | |
11 | -2018-04-04 18:02:39.467 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-04 18:02:39.711 INFO: 输入的字符是:admin | |
13 | -2018-04-04 18:02:39.833 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-04 18:02:40.008 INFO: 输入的字符是:essa123 | |
15 | -2018-04-04 18:02:48.181 ERROR: 1. | |
16 | -2018-04-04 18:02:48.243 INFO: 判断检查点是否存在 | |
17 | -2018-04-04 18:02:54.447 ERROR: 1. | |
18 | -2018-04-04 18:02:54.641 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-04 18:02:54.815 INFO: 输入的字符是:linrong | |
20 | -2018-04-04 18:02:54.927 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-04 18:02:55.080 INFO: 输入的字符是:essa123 | |
22 | -2018-04-04 18:03:02.619 ERROR: 1. | |
23 | -2018-04-04 18:03:02.666 INFO: 判断检查点是否存在 | |
24 | -2018-04-04 18:03:08.806 ERROR: 1. |
Log/20180404_180725.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-04 18:07:25.164 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-04 18:07:25.179 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-04 18:07:25.179 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-04 18:07:30.125 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-04 18:07:31.658 INFO: 窗口最大化 | |
6 | -2018-04-04 18:07:34.239 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-04 18:07:34.264 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-04 18:07:34.359 INFO: 获取所要读取的文件 | |
9 | -2018-04-04 18:07:35.492 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-04 18:07:35.508 INFO: 读取文件成功 | |
11 | -2018-04-04 18:07:35.738 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-04 18:07:35.958 INFO: 输入的字符是:admin | |
13 | -2018-04-04 18:07:36.131 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-04 18:07:36.282 INFO: 输入的字符是:essa123 | |
15 | -2018-04-04 18:07:44.055 ERROR: 1. | |
16 | -2018-04-04 18:07:44.117 INFO: 判断检查点是否存在 | |
17 | -2018-04-04 18:07:50.476 ERROR: 1. | |
18 | -2018-04-04 18:07:50.597 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-04 18:07:50.764 INFO: 输入的字符是:linrong | |
20 | -2018-04-04 18:07:50.897 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-04 18:07:51.013 INFO: 输入的字符是:essa123 | |
22 | -2018-04-04 18:07:58.679 ERROR: 1. | |
23 | -2018-04-04 18:07:58.742 INFO: 判断检查点是否存在 | |
24 | -2018-04-04 18:08:05.117 ERROR: 1. |
Log/20180404_181751.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-04 18:17:51.287 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-04 18:17:51.287 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-04 18:17:51.287 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-04 18:17:56.054 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-04 18:17:57.539 INFO: 窗口最大化 | |
6 | -2018-04-04 18:17:59.895 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-04 18:17:59.904 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-04 18:17:59.968 INFO: 获取所要读取的文件 | |
9 | -2018-04-04 18:18:01.192 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-04 18:18:01.197 INFO: 读取文件成功 | |
11 | -2018-04-04 18:18:01.403 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-04 18:18:01.601 INFO: 输入的字符是:admin | |
13 | -2018-04-04 18:18:01.719 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-04 18:18:01.885 INFO: 输入的字符是:essa123 | |
15 | -2018-04-04 18:18:09.927 ERROR: 1. | |
16 | -2018-04-04 18:18:09.989 INFO: 判断检查点是否存在 | |
17 | -2018-04-04 18:18:16.661 ERROR: 1. | |
18 | -2018-04-04 18:18:16.816 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-04 18:18:16.986 INFO: 输入的字符是:linrong | |
20 | -2018-04-04 18:18:17.119 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-04 18:18:17.299 INFO: 输入的字符是:essa123 | |
22 | -2018-04-04 18:18:24.192 ERROR: 1. | |
23 | -2018-04-04 18:18:24.239 INFO: 判断检查点是否存在 | |
24 | -2018-04-04 18:18:30.443 ERROR: 1. |
Log/20180404_182202.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-04 18:22:02.973 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-04 18:22:02.973 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-04 18:22:02.973 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-04 18:22:07.567 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-04 18:22:09.061 INFO: 窗口最大化 | |
6 | -2018-04-04 18:22:11.419 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-04 18:22:11.433 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-04 18:22:11.505 INFO: 获取所要读取的文件 | |
9 | -2018-04-04 18:22:12.661 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-04 18:22:12.676 INFO: 读取文件成功 | |
11 | -2018-04-04 18:22:12.880 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-04 18:22:13.072 INFO: 输入的字符是:admin | |
13 | -2018-04-04 18:22:13.203 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-04 18:22:13.343 INFO: 输入的字符是:essa123 | |
15 | -2018-04-04 18:22:15.888 INFO: 点击元素: | |
16 | -2018-04-04 18:22:16.741 INFO: 判断检查点是否存在 | |
17 | -2018-04-04 18:22:17.961 INFO: 点击元素: | |
18 | -2018-04-04 18:22:18.137 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-04 18:22:18.300 INFO: 输入的字符是:linrong | |
20 | -2018-04-04 18:22:18.424 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-04 18:22:18.573 INFO: 输入的字符是:essa123 | |
22 | -2018-04-04 18:22:20.958 INFO: 点击元素: | |
23 | -2018-04-04 18:22:21.494 INFO: 判断检查点是否存在 | |
24 | -2018-04-04 18:22:22.537 INFO: 点击元素: |
Log/20180404_182628.log deleted
... | ... | @@ -1,64 +0,0 @@ |
1 | -2018-04-04 18:26:28.096 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-04 18:26:28.096 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-04 18:26:28.096 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-04 18:26:32.879 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-04 18:26:34.368 INFO: 窗口最大化 | |
6 | -2018-04-04 18:26:36.675 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-04 18:26:36.683 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-04 18:26:36.767 INFO: 获取所要读取的文件 | |
9 | -2018-04-04 18:26:37.738 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-04 18:26:37.755 INFO: 读取文件成功 | |
11 | -2018-04-04 18:26:37.947 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-04 18:26:38.165 INFO: 输入的字符是:admin | |
13 | -2018-04-04 18:26:38.284 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-04 18:26:38.429 INFO: 输入的字符是:essa123 | |
15 | -2018-04-04 18:26:46.175 ERROR: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id='subBtn']"} | |
16 | - (Session info: chrome=65.0.3325.181) | |
17 | - (Driver info: chromedriver=2.37.543627 (63642262d9fb93fb4ab52398be4286d844092a5e),platform=Windows NT 10.0.10586 x86) (WARNING: The server did not provide any stacktrace information) | |
18 | -Command duration or timeout: 0 milliseconds | |
19 | -For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html | |
20 | -Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:26:55.152Z' | |
21 | -System info: host: 'DESKTOP-NIGE62D', ip: '10.0.2.15', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_144' | |
22 | -Driver info: org.openqa.selenium.chrome.ChromeDriver | |
23 | -Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.37.543627 (63642262d9fb93..., userDataDir: C:\Users\jin\AppData\Local\...}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 65.0.3325.181, webStorageEnabled: true} | |
24 | -Session ID: 0541c0747091ae63f9836b34921c75e9 | |
25 | -*** Element info: {Using=xpath, value=//*[@id='subBtn']}. | |
26 | -2018-04-04 18:26:46.238 INFO: 判断检查点是否存在 | |
27 | -2018-04-04 18:26:52.519 ERROR: no such element: Unable to locate element: {"method":"xpath","selector":"//*[text()='退出']"} | |
28 | - (Session info: chrome=65.0.3325.181) | |
29 | - (Driver info: chromedriver=2.37.543627 (63642262d9fb93fb4ab52398be4286d844092a5e),platform=Windows NT 10.0.10586 x86) (WARNING: The server did not provide any stacktrace information) | |
30 | -Command duration or timeout: 0 milliseconds | |
31 | -For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html | |
32 | -Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:26:55.152Z' | |
33 | -System info: host: 'DESKTOP-NIGE62D', ip: '10.0.2.15', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_144' | |
34 | -Driver info: org.openqa.selenium.chrome.ChromeDriver | |
35 | -Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.37.543627 (63642262d9fb93..., userDataDir: C:\Users\jin\AppData\Local\...}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 65.0.3325.181, webStorageEnabled: true} | |
36 | -Session ID: 0541c0747091ae63f9836b34921c75e9 | |
37 | -*** Element info: {Using=xpath, value=//*[text()='退出']}. | |
38 | -2018-04-04 18:26:52.683 INFO: 清除文本框中已有字符: //*[@id='username']] | |
39 | -2018-04-04 18:26:52.831 INFO: 输入的字符是:linrong | |
40 | -2018-04-04 18:26:52.939 INFO: 清除文本框中已有字符: //*[@id='password']] | |
41 | -2018-04-04 18:26:53.067 INFO: 输入的字符是:essa123 | |
42 | -2018-04-04 18:27:00.456 ERROR: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id='subBtn']"} | |
43 | - (Session info: chrome=65.0.3325.181) | |
44 | - (Driver info: chromedriver=2.37.543627 (63642262d9fb93fb4ab52398be4286d844092a5e),platform=Windows NT 10.0.10586 x86) (WARNING: The server did not provide any stacktrace information) | |
45 | -Command duration or timeout: 0 milliseconds | |
46 | -For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html | |
47 | -Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:26:55.152Z' | |
48 | -System info: host: 'DESKTOP-NIGE62D', ip: '10.0.2.15', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_144' | |
49 | -Driver info: org.openqa.selenium.chrome.ChromeDriver | |
50 | -Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.37.543627 (63642262d9fb93..., userDataDir: C:\Users\jin\AppData\Local\...}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 65.0.3325.181, webStorageEnabled: true} | |
51 | -Session ID: 0541c0747091ae63f9836b34921c75e9 | |
52 | -*** Element info: {Using=xpath, value=//*[@id='subBtn']}. | |
53 | -2018-04-04 18:27:00.550 INFO: 判断检查点是否存在 | |
54 | -2018-04-04 18:27:06.731 ERROR: no such element: Unable to locate element: {"method":"xpath","selector":"//*[text()='退出']"} | |
55 | - (Session info: chrome=65.0.3325.181) | |
56 | - (Driver info: chromedriver=2.37.543627 (63642262d9fb93fb4ab52398be4286d844092a5e),platform=Windows NT 10.0.10586 x86) (WARNING: The server did not provide any stacktrace information) | |
57 | -Command duration or timeout: 0 milliseconds | |
58 | -For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html | |
59 | -Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:26:55.152Z' | |
60 | -System info: host: 'DESKTOP-NIGE62D', ip: '10.0.2.15', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_144' | |
61 | -Driver info: org.openqa.selenium.chrome.ChromeDriver | |
62 | -Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.37.543627 (63642262d9fb93..., userDataDir: C:\Users\jin\AppData\Local\...}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 65.0.3325.181, webStorageEnabled: true} | |
63 | -Session ID: 0541c0747091ae63f9836b34921c75e9 | |
64 | -*** Element info: {Using=xpath, value=//*[text()='退出']}. |
Log/20180404_182825.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-04 18:28:25.143 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-04 18:28:25.143 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-04 18:28:25.143 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-04 18:28:29.737 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-04 18:28:31.255 INFO: 窗口最大化 | |
6 | -2018-04-04 18:28:33.778 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-04 18:28:33.801 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-04 18:28:33.873 INFO: 获取所要读取的文件 | |
9 | -2018-04-04 18:28:34.831 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-04 18:28:34.848 INFO: 读取文件成功 | |
11 | -2018-04-04 18:28:35.104 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-04 18:28:35.211 INFO: 输入的字符是:admin | |
13 | -2018-04-04 18:28:35.393 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-04 18:28:35.526 INFO: 输入的字符是:essa123 | |
15 | -2018-04-04 18:28:43.581 ERROR: 1. | |
16 | -2018-04-04 18:28:43.659 INFO: 判断检查点是否存在 | |
17 | -2018-04-04 18:28:50.768 ERROR: 1. | |
18 | -2018-04-04 18:28:50.974 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-04 18:28:51.152 INFO: 输入的字符是:linrong | |
20 | -2018-04-04 18:28:51.279 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-04 18:28:51.411 INFO: 输入的字符是:essa123 | |
22 | -2018-04-04 18:28:58.956 ERROR: 1. | |
23 | -2018-04-04 18:28:59.019 INFO: 判断检查点是否存在 | |
24 | -2018-04-04 18:29:05.096 ERROR: 1. |
Log/20180404_182939.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-04 18:29:39.581 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-04 18:29:39.590 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-04 18:29:39.590 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-04 18:29:44.097 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-04 18:29:45.578 INFO: 窗口最大化 | |
6 | -2018-04-04 18:29:48.081 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-04 18:29:48.108 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-04 18:29:48.175 INFO: 获取所要读取的文件 | |
9 | -2018-04-04 18:29:49.252 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-04 18:29:49.268 INFO: 读取文件成功 | |
11 | -2018-04-04 18:29:49.528 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-04 18:29:49.898 INFO: 输入的字符是:admin | |
13 | -2018-04-04 18:29:50.157 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-04 18:29:50.605 INFO: 输入的字符是:essa123 | |
15 | -2018-04-04 18:29:50.724 INFO: 点击元素: //*[@id='subBtn']] | |
16 | -2018-04-04 18:29:55.207 INFO: 判断检查点是否存在 | |
17 | -2018-04-04 18:29:55.252 INFO: 点击元素: //*[text()='退出']] | |
18 | -2018-04-04 18:29:56.969 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-04 18:29:57.122 INFO: 输入的字符是:linrong | |
20 | -2018-04-04 18:29:57.253 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-04 18:29:57.389 INFO: 输入的字符是:essa123 | |
22 | -2018-04-04 18:29:57.442 INFO: 点击元素: //*[@id='subBtn']] | |
23 | -2018-04-04 18:29:59.977 INFO: 判断检查点是否存在 | |
24 | -2018-04-04 18:30:00.021 INFO: 点击元素: //*[text()='退出']] |
Log/20180410_114626.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-10 11:46:26.812 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-10 11:46:26.832 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-10 11:46:26.833 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-10 11:46:33.684 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-10 11:46:35.332 INFO: 窗口最大化 | |
6 | -2018-04-10 11:46:38.066 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-10 11:46:38.087 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-10 11:46:38.330 INFO: 获取所要读取的文件 | |
9 | -2018-04-10 11:46:39.784 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-10 11:46:39.798 INFO: 读取文件成功 | |
11 | -2018-04-10 11:46:40.121 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-10 11:46:40.341 INFO: 输入的字符是:admin | |
13 | -2018-04-10 11:46:40.551 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-10 11:46:40.679 INFO: 输入的字符是:essa123 | |
15 | -2018-04-10 11:46:40.747 INFO: 点击元素: //*[@id='subBtn']] | |
16 | -2018-04-10 11:46:45.183 INFO: 判断检查点是否存在 | |
17 | -2018-04-10 11:46:45.234 INFO: 点击元素: //*[text()='退出']] | |
18 | -2018-04-10 11:46:46.921 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-10 11:46:47.220 INFO: 输入的字符是:linrong | |
20 | -2018-04-10 11:46:47.353 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-10 11:46:47.585 INFO: 输入的字符是:essa123 | |
22 | -2018-04-10 11:46:47.643 INFO: 点击元素: //*[@id='subBtn']] | |
23 | -2018-04-10 11:46:50.805 INFO: 判断检查点是否存在 | |
24 | -2018-04-10 11:46:50.854 INFO: 点击元素: //*[text()='退出']] |
Log/20180410_115209.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-10 11:52:09.045 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-10 11:52:09.051 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-10 11:52:09.051 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-10 11:52:17.495 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-10 11:52:18.986 INFO: 窗口最大化 | |
6 | -2018-04-10 11:52:21.976 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-10 11:52:22.008 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-10 11:52:22.111 INFO: 获取所要读取的文件 | |
9 | -2018-04-10 11:52:23.518 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-10 11:52:23.539 INFO: 读取文件成功 | |
11 | -2018-04-10 11:52:23.851 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-10 11:52:24.393 INFO: 输入的字符是:admin | |
13 | -2018-04-10 11:52:24.523 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-10 11:52:24.711 INFO: 输入的字符是:essa123 | |
15 | -2018-04-10 11:52:24.786 INFO: 点击元素: //*[@id='subBtn']] | |
16 | -2018-04-10 11:52:28.838 INFO: 判断检查点是否存在 | |
17 | -2018-04-10 11:52:28.906 INFO: 点击元素: //*[text()='退出']] | |
18 | -2018-04-10 11:52:30.574 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-10 11:52:30.743 INFO: 输入的字符是:linrong | |
20 | -2018-04-10 11:52:30.861 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-10 11:52:31.027 INFO: 输入的字符是:essa123 | |
22 | -2018-04-10 11:52:31.079 INFO: 点击元素: //*[@id='subBtn']] | |
23 | -2018-04-10 11:52:34.844 INFO: 判断检查点是否存在 | |
24 | -2018-04-10 11:52:34.927 INFO: 点击元素: //*[text()='退出']] |
Log/20180410_154101.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-10 15:41:01.609 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-10 15:41:01.613 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-10 15:41:01.613 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-10 15:41:08.871 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-10 15:41:10.371 INFO: 窗口最大化 | |
6 | -2018-04-10 15:41:13.046 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-10 15:41:13.109 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-10 15:41:13.206 INFO: 获取所要读取的文件 | |
9 | -2018-04-10 15:41:14.652 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-10 15:41:14.666 INFO: 读取文件成功 | |
11 | -2018-04-10 15:41:14.952 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-10 15:41:15.127 INFO: 输入的字符是:admin | |
13 | -2018-04-10 15:41:15.285 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-10 15:41:15.433 INFO: 输入的字符是:essa123 | |
15 | -2018-04-10 15:41:15.504 INFO: 点击元素: //*[@id='subBtn']] | |
16 | -2018-04-10 15:41:19.096 INFO: 判断检查点是否存在 | |
17 | -2018-04-10 15:41:19.148 INFO: 点击元素: //*[text()='退出']] | |
18 | -2018-04-10 15:41:20.743 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-10 15:41:20.975 INFO: 输入的字符是:linrong | |
20 | -2018-04-10 15:41:21.084 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-10 15:41:21.230 INFO: 输入的字符是:essa123 | |
22 | -2018-04-10 15:41:21.289 INFO: 点击元素: //*[@id='subBtn']] | |
23 | -2018-04-10 15:41:24.290 INFO: 判断检查点是否存在 | |
24 | -2018-04-10 15:41:24.330 INFO: 点击元素: //*[text()='退出']] |
Log/20180410_154254.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-10 15:42:54.513 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-10 15:42:54.516 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-10 15:42:54.516 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-10 15:42:59.124 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-10 15:43:00.731 INFO: 窗口最大化 | |
6 | -2018-04-10 15:43:03.416 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-10 15:43:03.459 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-10 15:43:03.555 INFO: 获取所要读取的文件 | |
9 | -2018-04-10 15:43:04.809 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-10 15:43:04.822 INFO: 读取文件成功 | |
11 | -2018-04-10 15:43:05.022 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-10 15:43:05.218 INFO: 输入的字符是:admin | |
13 | -2018-04-10 15:43:05.411 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-10 15:43:05.557 INFO: 输入的字符是:essa123 | |
15 | -2018-04-10 15:43:05.624 INFO: 点击元素: //*[@id='subBtn']] | |
16 | -2018-04-10 15:43:09.387 INFO: 判断检查点是否存在 | |
17 | -2018-04-10 15:43:09.445 INFO: 点击元素: //*[text()='退出']] | |
18 | -2018-04-10 15:43:11.406 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-10 15:43:11.571 INFO: 输入的字符是:linrong | |
20 | -2018-04-10 15:43:11.737 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-10 15:43:11.884 INFO: 输入的字符是:essa123 | |
22 | -2018-04-10 15:43:11.951 INFO: 点击元素: //*[@id='subBtn']] | |
23 | -2018-04-10 15:43:15.366 INFO: 判断检查点是否存在 | |
24 | -2018-04-10 15:43:15.426 INFO: 点击元素: //*[text()='退出']] |
Log/20180410_154626.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-10 15:46:26.131 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-10 15:46:26.134 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-10 15:46:26.135 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-10 15:46:30.921 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-10 15:46:32.374 INFO: 窗口最大化 | |
6 | -2018-04-10 15:46:34.565 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-10 15:46:34.585 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-10 15:46:34.666 INFO: 获取所要读取的文件 | |
9 | -2018-04-10 15:46:35.742 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-10 15:46:35.757 INFO: 读取文件成功 | |
11 | -2018-04-10 15:46:35.937 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-10 15:46:36.119 INFO: 输入的字符是:admin | |
13 | -2018-04-10 15:46:36.264 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-10 15:46:36.388 INFO: 输入的字符是:essa123 | |
15 | -2018-04-10 15:46:36.447 INFO: 点击元素: //*[@id='subBtn']] | |
16 | -2018-04-10 15:46:39.735 INFO: 判断检查点是否存在 | |
17 | -2018-04-10 15:46:39.780 INFO: 点击元素: //*[text()='退出']] | |
18 | -2018-04-10 15:46:41.144 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-10 15:46:41.326 INFO: 输入的字符是:linrong | |
20 | -2018-04-10 15:46:41.434 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-10 15:46:41.583 INFO: 输入的字符是:essa123 | |
22 | -2018-04-10 15:46:41.654 INFO: 点击元素: //*[@id='subBtn']] | |
23 | -2018-04-10 15:46:45.982 INFO: 判断检查点是否存在 | |
24 | -2018-04-10 15:46:46.023 INFO: 点击元素: //*[text()='退出']] |
Log/20180410_160850.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-10 16:08:50.875 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-10 16:08:50.879 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-10 16:08:50.879 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-10 16:08:55.660 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-10 16:08:57.142 INFO: 窗口最大化 | |
6 | -2018-04-10 16:08:59.424 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-10 16:08:59.447 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-10 16:08:59.545 INFO: 获取所要读取的文件 | |
9 | -2018-04-10 16:09:00.575 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-10 16:09:00.589 INFO: 读取文件成功 | |
11 | -2018-04-10 16:09:00.796 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-10 16:09:00.974 INFO: 输入的字符是:admin | |
13 | -2018-04-10 16:09:01.113 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-10 16:09:01.270 INFO: 输入的字符是:essa123 | |
15 | -2018-04-10 16:09:01.330 INFO: 点击元素: //*[@id='subBtn']] | |
16 | -2018-04-10 16:09:04.632 INFO: 判断检查点是否存在 | |
17 | -2018-04-10 16:09:04.682 INFO: 点击元素: //*[text()='退出']] | |
18 | -2018-04-10 16:09:05.923 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-10 16:09:06.078 INFO: 输入的字符是:linrong | |
20 | -2018-04-10 16:09:06.220 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-10 16:09:06.360 INFO: 输入的字符是:essa123 | |
22 | -2018-04-10 16:09:06.420 INFO: 点击元素: //*[@id='subBtn']] | |
23 | -2018-04-10 16:09:09.060 INFO: 判断检查点是否存在 | |
24 | -2018-04-10 16:09:09.103 INFO: 点击元素: //*[text()='退出']] |
Log/20180410_161331.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-10 16:13:31.810 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-10 16:13:31.817 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-10 16:13:31.817 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-10 16:13:36.357 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-10 16:13:37.841 INFO: 窗口最大化 | |
6 | -2018-04-10 16:13:40.030 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-10 16:13:40.050 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-10 16:13:40.142 INFO: 获取所要读取的文件 | |
9 | -2018-04-10 16:13:41.185 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-10 16:13:41.216 INFO: 读取文件成功 | |
11 | -2018-04-10 16:13:41.416 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-10 16:13:41.584 INFO: 输入的字符是:admin | |
13 | -2018-04-10 16:13:41.717 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-10 16:13:41.846 INFO: 输入的字符是:essa123 | |
15 | -2018-04-10 16:13:41.906 INFO: 点击元素: //*[@id='subBtn']] | |
16 | -2018-04-10 16:13:45.022 INFO: 判断检查点是否存在 | |
17 | -2018-04-10 16:13:45.091 INFO: 点击元素: //*[text()='退出']] | |
18 | -2018-04-10 16:13:46.348 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-10 16:13:46.500 INFO: 输入的字符是:linrong | |
20 | -2018-04-10 16:13:46.661 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-10 16:13:46.787 INFO: 输入的字符是:essa123 | |
22 | -2018-04-10 16:13:46.821 INFO: 点击元素: //*[@id='subBtn']] | |
23 | -2018-04-10 16:13:49.483 INFO: 判断检查点是否存在 | |
24 | -2018-04-10 16:13:49.561 INFO: 点击元素: //*[text()='退出']] |
Log/20180410_161546.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-10 16:15:46.528 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-10 16:15:46.528 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-10 16:15:46.528 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-10 16:15:51.449 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-10 16:15:52.935 INFO: 窗口最大化 | |
6 | -2018-04-10 16:15:55.414 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-10 16:15:55.429 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-10 16:15:55.499 INFO: 获取所要读取的文件 | |
9 | -2018-04-10 16:15:56.465 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-10 16:15:56.481 INFO: 读取文件成功 | |
11 | -2018-04-10 16:15:56.681 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-10 16:15:56.912 INFO: 输入的字符是:admin | |
13 | -2018-04-10 16:15:57.059 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-10 16:15:57.194 INFO: 输入的字符是:essa123 | |
15 | -2018-04-10 16:15:57.284 INFO: 点击元素: //*[@id='subBtn']] | |
16 | -2018-04-10 16:16:00.655 INFO: 判断检查点是否存在 | |
17 | -2018-04-10 16:16:00.700 INFO: 点击元素: //*[text()='退出']] | |
18 | -2018-04-10 16:16:02.304 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-10 16:16:02.570 INFO: 输入的字符是:linrong | |
20 | -2018-04-10 16:16:02.748 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-10 16:16:02.893 INFO: 输入的字符是:essa123 | |
22 | -2018-04-10 16:16:02.947 INFO: 点击元素: //*[@id='subBtn']] | |
23 | -2018-04-10 16:16:05.745 INFO: 判断检查点是否存在 | |
24 | -2018-04-10 16:16:05.795 INFO: 点击元素: //*[text()='退出']] |
Log/20180410_175527.log deleted
... | ... | @@ -1,7 +0,0 @@ |
1 | -2018-04-10 17:55:27.867 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-10 17:55:27.877 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-10 17:55:27.880 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-10 17:55:37.543 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-10 17:55:39.301 INFO: 获取所要读取的文件 | |
6 | -2018-04-10 17:55:41.485 INFO: 文件为:.xlsx格式 | |
7 | -2018-04-10 17:55:41.504 INFO: 读取文件成功 |
Log/20180410_175644.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-10 17:56:44.387 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-10 17:56:44.387 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-10 17:56:44.387 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-10 17:56:50.167 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-10 17:56:51.692 INFO: 窗口最大化 | |
6 | -2018-04-10 17:56:55.618 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-10 17:56:55.635 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-10 17:56:55.714 INFO: 获取所要读取的文件 | |
9 | -2018-04-10 17:56:57.011 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-10 17:56:57.045 INFO: 读取文件成功 | |
11 | -2018-04-10 17:56:57.392 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-10 17:56:57.581 INFO: 输入的字符是:admin | |
13 | -2018-04-10 17:56:57.727 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-10 17:56:57.882 INFO: 输入的字符是:essa123 | |
15 | -2018-04-10 17:56:57.946 INFO: 点击元素: //*[@id='subBtn']] | |
16 | -2018-04-10 17:57:02.890 INFO: 判断检查点是否存在 | |
17 | -2018-04-10 17:57:02.964 INFO: 点击元素: //*[text()='退出']] | |
18 | -2018-04-10 17:57:04.630 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-10 17:57:04.822 INFO: 输入的字符是:linrong | |
20 | -2018-04-10 17:57:04.960 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-10 17:57:05.162 INFO: 输入的字符是:essa123 | |
22 | -2018-04-10 17:57:05.215 INFO: 点击元素: //*[@id='subBtn']] | |
23 | -2018-04-10 17:57:09.716 INFO: 判断检查点是否存在 | |
24 | -2018-04-10 17:57:09.767 INFO: 点击元素: //*[text()='退出']] |
Log/20180410_181116.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-10 18:11:16.428 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-10 18:11:16.428 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-10 18:11:16.428 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-10 18:11:21.055 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-10 18:11:22.503 INFO: 窗口最大化 | |
6 | -2018-04-10 18:11:25.643 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-10 18:11:25.667 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-10 18:11:25.776 INFO: 获取所要读取的文件 | |
9 | -2018-04-10 18:11:27.022 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-10 18:11:27.053 INFO: 读取文件成功 | |
11 | -2018-04-10 18:11:27.299 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-10 18:11:27.440 INFO: 输入的字符是:admin | |
13 | -2018-04-10 18:11:27.566 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-10 18:11:27.690 INFO: 输入的字符是:essa123 | |
15 | -2018-04-10 18:11:27.743 INFO: 点击元素: //*[@id='subBtn']] | |
16 | -2018-04-10 18:11:31.415 INFO: 判断检查点是否存在 | |
17 | -2018-04-10 18:11:31.459 INFO: 点击元素: //*[text()='退出']] | |
18 | -2018-04-10 18:11:32.812 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-10 18:11:32.956 INFO: 输入的字符是:linrong | |
20 | -2018-04-10 18:11:33.048 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-10 18:11:33.169 INFO: 输入的字符是:essa123 | |
22 | -2018-04-10 18:11:33.214 INFO: 点击元素: //*[@id='subBtn']] | |
23 | -2018-04-10 18:11:36.652 INFO: 判断检查点是否存在 | |
24 | -2018-04-10 18:11:36.694 INFO: 点击元素: //*[text()='退出']] |
Log/20180410_181617.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-10 18:16:17.785 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-10 18:16:17.785 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-10 18:16:17.785 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-10 18:16:24.145 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-10 18:16:25.850 INFO: 窗口最大化 | |
6 | -2018-04-10 18:16:31.197 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-10 18:16:31.239 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-10 18:16:31.333 INFO: 获取所要读取的文件 | |
9 | -2018-04-10 18:16:33.457 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-10 18:16:33.520 INFO: 读取文件成功 | |
11 | -2018-04-10 18:16:33.822 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-10 18:16:34.081 INFO: 输入的字符是:admin | |
13 | -2018-04-10 18:16:34.304 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-10 18:16:34.535 INFO: 输入的字符是:essa123 | |
15 | -2018-04-10 18:16:34.629 INFO: 点击元素: //*[@id='subBtn']] | |
16 | -2018-04-10 18:16:41.802 INFO: 判断检查点是否存在 | |
17 | -2018-04-10 18:16:41.895 INFO: 点击元素: //*[text()='退出']] | |
18 | -2018-04-10 18:16:43.959 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-10 18:16:44.263 INFO: 输入的字符是:linrong | |
20 | -2018-04-10 18:16:44.528 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-10 18:16:44.779 INFO: 输入的字符是:essa123 | |
22 | -2018-04-10 18:16:44.879 INFO: 点击元素: //*[@id='subBtn']] | |
23 | -2018-04-10 18:16:50.458 INFO: 判断检查点是否存在 | |
24 | -2018-04-10 18:16:50.551 INFO: 点击元素: //*[text()='退出']] |
Log/20180410_182112.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-10 18:21:12.472 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-10 18:21:12.488 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-10 18:21:12.503 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-10 18:21:16.909 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-10 18:21:18.492 INFO: 窗口最大化 | |
6 | -2018-04-10 18:21:22.457 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-10 18:21:22.465 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-10 18:21:22.533 INFO: 获取所要读取的文件 | |
9 | -2018-04-10 18:21:23.972 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-10 18:21:23.987 INFO: 读取文件成功 | |
11 | -2018-04-10 18:21:24.188 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-10 18:21:24.367 INFO: 输入的字符是:admin | |
13 | -2018-04-10 18:21:24.509 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-10 18:21:24.703 INFO: 输入的字符是:essa123 | |
15 | -2018-04-10 18:21:24.767 INFO: 点击元素: //*[@id='subBtn']] | |
16 | -2018-04-10 18:21:29.009 INFO: 判断检查点是否存在 | |
17 | -2018-04-10 18:21:29.064 INFO: 点击元素: //*[text()='退出']] | |
18 | -2018-04-10 18:21:31.203 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-10 18:21:31.423 INFO: 输入的字符是:linrong | |
20 | -2018-04-10 18:21:31.534 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-10 18:21:31.773 INFO: 输入的字符是:essa123 | |
22 | -2018-04-10 18:21:31.857 INFO: 点击元素: //*[@id='subBtn']] | |
23 | -2018-04-10 18:21:35.160 INFO: 判断检查点是否存在 | |
24 | -2018-04-10 18:21:35.203 INFO: 点击元素: //*[text()='退出']] |
Log/20180410_182513.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-10 18:25:13.904 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-10 18:25:13.908 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-10 18:25:13.909 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-10 18:25:19.731 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-10 18:25:21.294 INFO: 窗口最大化 | |
6 | -2018-04-10 18:25:27.893 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-10 18:25:27.901 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-10 18:25:28.089 INFO: 获取所要读取的文件 | |
9 | -2018-04-10 18:25:29.964 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-10 18:25:29.998 INFO: 读取文件成功 | |
11 | -2018-04-10 18:25:30.232 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-10 18:25:30.431 INFO: 输入的字符是:admin | |
13 | -2018-04-10 18:25:30.596 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-10 18:25:30.783 INFO: 输入的字符是:essa123 | |
15 | -2018-04-10 18:25:30.863 INFO: 点击元素: //*[@id='subBtn']] | |
16 | -2018-04-10 18:25:36.627 INFO: 判断检查点是否存在 | |
17 | -2018-04-10 18:25:36.675 INFO: 点击元素: //*[text()='退出']] | |
18 | -2018-04-10 18:25:38.822 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-10 18:25:39.038 INFO: 输入的字符是:linrong | |
20 | -2018-04-10 18:25:39.159 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-10 18:25:39.325 INFO: 输入的字符是:essa123 | |
22 | -2018-04-10 18:25:39.379 INFO: 点击元素: //*[@id='subBtn']] | |
23 | -2018-04-10 18:25:48.101 INFO: 判断检查点是否存在 | |
24 | -2018-04-10 18:25:48.175 INFO: 点击元素: //*[text()='退出']] |
Log/20180410_182641.log deleted
... | ... | @@ -1,24 +0,0 @@ |
1 | -2018-04-10 18:26:41.705 INFO: 开始从配置文件中选择浏览器 | |
2 | -2018-04-10 18:26:41.709 INFO: 所选择的浏览器类型为: Chrome | |
3 | -2018-04-10 18:26:41.710 INFO: 所测试的URL地址为: http://bpms.hotfix.gz.essa | |
4 | -2018-04-10 18:26:47.049 INFO: 正在启动Chrome浏览器 | |
5 | -2018-04-10 18:26:48.683 INFO: 窗口最大化 | |
6 | -2018-04-10 18:26:54.150 INFO: 打开URL: http://bpms.hotfix.gz.essa | |
7 | -2018-04-10 18:26:54.163 INFO: 设置隐性等待5 秒 | |
8 | -2018-04-10 18:26:54.269 INFO: 获取所要读取的文件 | |
9 | -2018-04-10 18:26:56.317 INFO: 文件为:.xlsx格式 | |
10 | -2018-04-10 18:26:56.344 INFO: 读取文件成功 | |
11 | -2018-04-10 18:26:56.659 INFO: 清除文本框中已有字符: //*[@id='username']] | |
12 | -2018-04-10 18:26:56.867 INFO: 输入的字符是:admin | |
13 | -2018-04-10 18:26:57.089 INFO: 清除文本框中已有字符: //*[@id='password']] | |
14 | -2018-04-10 18:26:57.424 INFO: 输入的字符是:essa123 | |
15 | -2018-04-10 18:26:57.492 INFO: 点击元素: //*[@id='subBtn']] | |
16 | -2018-04-10 18:27:03.492 INFO: 判断检查点是否存在 | |
17 | -2018-04-10 18:27:03.579 INFO: 点击元素: //*[text()='退出']] | |
18 | -2018-04-10 18:27:06.532 INFO: 清除文本框中已有字符: //*[@id='username']] | |
19 | -2018-04-10 18:27:06.831 INFO: 输入的字符是:linrong | |
20 | -2018-04-10 18:27:07.431 INFO: 清除文本框中已有字符: //*[@id='password']] | |
21 | -2018-04-10 18:27:07.794 INFO: 输入的字符是:essa123 | |
22 | -2018-04-10 18:27:07.880 INFO: 点击元素: //*[@id='subBtn']] | |
23 | -2018-04-10 18:27:12.803 INFO: 判断检查点是否存在 | |
24 | -2018-04-10 18:27:12.855 INFO: 点击元素: //*[text()='退出']] |
84.8 KB
105 KB
... | ... | @@ -0,0 +1,16 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > | |
3 | +<suite name="新增市场商品"> | |
4 | + <test name="addMarketGoods"> | |
5 | + <classes> | |
6 | + <class name="com.essa.testSuite.TestAddMarketGoods"> | |
7 | + <methods> | |
8 | + <include name="toMarketGoodsRelesePage"/> | |
9 | + <include name="addMarketGoods"/> | |
10 | + <include name="auditMarketGoods"/> | |
11 | + </methods> | |
12 | + </class> | |
13 | + </classes> | |
14 | + </test> | |
15 | +</suite> | |
16 | + | ... | ... |
... | ... | @@ -0,0 +1,14 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > | |
3 | +<suite name="添加SKU到购物车"> | |
4 | + <test name="buyerRegister"> | |
5 | + <classes> | |
6 | + <class name="com.buyer.testSuite.TestAddToCart"> | |
7 | + <methods> | |
8 | + <include name="keywordToCart"/> | |
9 | + </methods> | |
10 | + </class> | |
11 | + </classes> | |
12 | + </test> | |
13 | +</suite> | |
14 | + | ... | ... |
... | ... | @@ -0,0 +1,19 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > | |
3 | +<suite name="采购商注册"> | |
4 | + <test name="buyerRegister"> | |
5 | + <classes> | |
6 | + <class name="com.essa.testSuite.TestGenrateCode"> | |
7 | + <methods> | |
8 | + <include name="genrateCode"/> | |
9 | + </methods> | |
10 | + </class> | |
11 | + <class name="com.buyer.testSuite.TestRegister"> | |
12 | + <methods> | |
13 | + <include name="register"/> | |
14 | + </methods> | |
15 | + </class> | |
16 | + </classes> | |
17 | + </test> | |
18 | +</suite> | |
19 | + | ... | ... |
... | ... | @@ -0,0 +1,19 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > | |
3 | +<suite name="成品询价"> | |
4 | + <test name="productInquiry"> | |
5 | + <classes> | |
6 | + <class name="com.buyer.testSuite.TestAddToCart"> | |
7 | + <methods> | |
8 | + <include name="keywordToCart"/> | |
9 | + </methods> | |
10 | + </class> | |
11 | + <class name="com.essa.testSuite.TestProductInquiry"> | |
12 | + <methods> | |
13 | + <include name="productInquiry"/> | |
14 | + </methods> | |
15 | + </class> | |
16 | + </classes> | |
17 | + </test> | |
18 | +</suite> | |
19 | + | ... | ... |
... | ... | @@ -0,0 +1,24 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > | |
3 | +<suite name="发布团购商品"> | |
4 | + <test name="publishGroupPurchase"> | |
5 | + <classes> | |
6 | + <class name="com.essa.testSuite.TestAddOriginalGoods"> | |
7 | + <methods> | |
8 | + <include name="toAddOriginalGoodsPage"/> | |
9 | + <include name="updatePic"/> | |
10 | + <include name="auditOriginal"/> | |
11 | + <include name="getSkuNo"/> | |
12 | + </methods> | |
13 | + </class> | |
14 | + <class name="com.essa.testSuite.TestGroupPurchase"> | |
15 | + <methods> | |
16 | + <include name="SkuCategoryManagerCongfig"/> | |
17 | + <include name="publishGroupPurchase"/> | |
18 | + <include name="isPublish"/> | |
19 | + </methods> | |
20 | + </class> | |
21 | + </classes> | |
22 | + </test> | |
23 | +</suite> | |
24 | + | ... | ... |
... | ... | @@ -0,0 +1,25 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > | |
3 | +<suite name="提交PO"> | |
4 | + <test name="sendPO"> | |
5 | + <classes> | |
6 | + <class name="com.buyer.testSuite.TestAddToCart"> | |
7 | + <methods> | |
8 | + <include name="addSku"/> | |
9 | + </methods> | |
10 | + </class> | |
11 | + <class name="com.essa.testSuite.TestProductInquiry"> | |
12 | + <methods> | |
13 | + <include name="productInquiry"/> | |
14 | + </methods> | |
15 | + </class> | |
16 | + <class name="com.buyer.testSuite.TestSendPO"> | |
17 | + <methods> | |
18 | + <include name="conslidation"/> | |
19 | + <include name="sendPO"/> | |
20 | + </methods> | |
21 | + </class> | |
22 | + </classes> | |
23 | + </test> | |
24 | +</suite> | |
25 | + | ... | ... |
... | ... | @@ -0,0 +1,20 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > | |
3 | +<suite name="提交PO-活动商品"> | |
4 | + <test name="sendActivityPO"> | |
5 | + <classes> | |
6 | + <class name="com.buyer.testSuite.TestAddToCart"> | |
7 | + <methods> | |
8 | + <include name="addSku"/> | |
9 | + </methods> | |
10 | + </class> | |
11 | + <class name="com.buyer.testSuite.TestSendPO"> | |
12 | + <methods> | |
13 | + <include name="conslidation"/> | |
14 | + <include name="sendPO"/> | |
15 | + </methods> | |
16 | + </class> | |
17 | + </classes> | |
18 | + </test> | |
19 | +</suite> | |
20 | + | ... | ... |
src/main/resources/data.xlsx deleted
No preview for this file type
src/test/java/com/buyer/pageObject/AssetManagementPage.java
0 → 100644
src/test/java/com/buyer/pageObject/BuyerLoginPage.java
0 → 100644
... | ... | @@ -0,0 +1,48 @@ |
1 | +package com.buyer.pageObject; | |
2 | + | |
3 | +import org.openqa.selenium.WebDriver; | |
4 | +import org.openqa.selenium.WebElement; | |
5 | +import org.openqa.selenium.support.FindBy; | |
6 | + | |
7 | +import com.essa.framework.BasePage; | |
8 | + | |
9 | +/** | |
10 | + * 采购商登录页 | |
11 | + * @author Administrator | |
12 | + * | |
13 | + */ | |
14 | +public class BuyerLoginPage extends BasePage { | |
15 | + public BuyerLoginPage(WebDriver driver) { | |
16 | + super(driver); | |
17 | + } | |
18 | + /* | |
19 | + * 页面元素定位 | |
20 | + */ | |
21 | + //用户名:邮箱 | |
22 | + @FindBy (xpath = "//*[@id='username']") | |
23 | + WebElement userName; | |
24 | + | |
25 | + //密码 | |
26 | + @FindBy (xpath = "//*[@id='password']") | |
27 | + WebElement passWord; | |
28 | + | |
29 | + //登录按钮 | |
30 | + @FindBy (xpath = "//*[@id='login']") | |
31 | + WebElement signIn; | |
32 | + | |
33 | + /* | |
34 | + * 页面方法 | |
35 | + */ | |
36 | + /** | |
37 | + * 采购商登录方法 | |
38 | + * @param account 账号 | |
39 | + * @param password 密码 | |
40 | + * @return IndexPage | |
41 | + */ | |
42 | + public IndexPage login(String account,String password) { | |
43 | + sendKeys(userName, account); | |
44 | + sendKeys(passWord, password); | |
45 | + click(signIn); | |
46 | + return new IndexPage(driver); | |
47 | + } | |
48 | +} | ... | ... |
src/test/java/com/buyer/pageObject/ConslidationPage.java
0 → 100644
... | ... | @@ -0,0 +1,99 @@ |
1 | +package com.buyer.pageObject; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | +import com.essa.framework.Model; | |
10 | + | |
11 | +/** | |
12 | + * 暂存柜,拼柜页面 | |
13 | + * @author Administrator | |
14 | + * | |
15 | + */ | |
16 | +public class ConslidationPage extends BasePage { | |
17 | + public ConslidationPage(WebDriver driver) { | |
18 | + super(driver); | |
19 | + } | |
20 | + /* | |
21 | + * 元素定位 | |
22 | + */ | |
23 | + //关闭提示 | |
24 | + @FindBy(xpath="//*[@class='close']") | |
25 | + WebElement close; | |
26 | + | |
27 | + //选择散货 | |
28 | + @FindBy (xpath ="//button[text()='Bulk cargo']") | |
29 | + WebElement bulkCargo; | |
30 | + | |
31 | + //确认 | |
32 | + @FindBy (xpath="//button[text()='OK']") | |
33 | + WebElement ok; | |
34 | + | |
35 | + //查询输入框 | |
36 | + @FindBy (xpath="//*[@id='left-search']/div/input") | |
37 | + WebElement searchText; | |
38 | + | |
39 | + //查询按钮 | |
40 | + @FindBy (xpath="//*[@id='left-search']/div/span") | |
41 | + WebElement search; | |
42 | + | |
43 | + //左边列表第一个复选框 | |
44 | + @FindBy (xpath="//*[@id='left-product-list']/div[1]/div/div[2]/div/ul/li[1]/input") | |
45 | + WebElement leftFirstCheckbox; | |
46 | + | |
47 | + //中间加入右边的箭头 | |
48 | + @FindBy (xpath="//*[@id='icon-pi-right-big']") | |
49 | + WebElement add; | |
50 | + | |
51 | + //右边的第一个复选框 | |
52 | + @FindBy (xpath="//*[@id='right-product-list']/div/div/div[2]/div/ul/li[1]/input") | |
53 | + WebElement rightFirstCheckbox; | |
54 | + | |
55 | + //下一步,设置贴纸 | |
56 | + @FindBy (xpath="//*[@id='next']") | |
57 | + WebElement next; | |
58 | + | |
59 | + //确认弹框-可能会提示价格不一致 | |
60 | + @FindBy (xpath ="//a[text()='OK']") | |
61 | + WebElement ok2; | |
62 | + | |
63 | + /** | |
64 | + * 开始拼柜 | |
65 | + * @return SettingMarkerPage | |
66 | + */ | |
67 | + public SettingMarksPage conslidation() { | |
68 | + //是否有操作提示弹框 | |
69 | + if(isVisibility(By.xpath("//*[@class='close']"))) { | |
70 | + click(close); | |
71 | + } | |
72 | + forceWait(1000); | |
73 | + //是否有选择货柜 | |
74 | + if(isVisibility(By.xpath("//button[text()='Bulk cargo']"))) { | |
75 | + click(bulkCargo); | |
76 | + click(ok); | |
77 | + forceWait(1000); | |
78 | + } | |
79 | + sendKeys(searchText, Model.getSkuNo()); | |
80 | + click(search); | |
81 | + click(leftFirstCheckbox); | |
82 | + click(add); | |
83 | + //是否有加入到暂存柜 | |
84 | + while(!(isVisibility(rightFirstCheckbox))) { | |
85 | + forceWait(1000); | |
86 | + } | |
87 | + forceWait(1000); | |
88 | + moveHeightScroll("100"); | |
89 | + forceWait(1000); | |
90 | + click(next); | |
91 | + //如果提示价格变化,确认弹框 | |
92 | + if(isVisibility(By.xpath("//a[text()='OK']"))) { | |
93 | + click(ok2); | |
94 | + forceWait(1000); | |
95 | + click(next); | |
96 | + } | |
97 | + return new SettingMarksPage(driver); | |
98 | + } | |
99 | +} | ... | ... |
... | ... | @@ -0,0 +1,128 @@ |
1 | +package com.buyer.pageObject; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | +import com.essa.framework.Model; | |
10 | + | |
11 | +/** | |
12 | + * 采购商首页 | |
13 | + * @author Administrator | |
14 | + * | |
15 | + */ | |
16 | +public class IndexPage extends BasePage { | |
17 | + public IndexPage(WebDriver driver) { | |
18 | + super(driver); | |
19 | + } | |
20 | + /* | |
21 | + * 元素定位 | |
22 | + */ | |
23 | + //登录-sign in | |
24 | + @FindBy (xpath ="//*[@id='SignIn']/a") | |
25 | + WebElement signIn; | |
26 | + | |
27 | + //注册-register | |
28 | + @FindBy (xpath ="//*[@class='u-login']/a") | |
29 | + WebElement register; | |
30 | + | |
31 | + //关键字输入框 | |
32 | + @FindBy (xpath ="//*[@class='search-tx']/input") | |
33 | + WebElement searchText; | |
34 | + | |
35 | + //查询按钮 | |
36 | + @FindBy (xpath ="//*[@class='btn btn-primary search-btn']") | |
37 | + WebElement searchButton; | |
38 | + | |
39 | + //绑定手机弹窗-关闭按钮 | |
40 | + @FindBy (xpath ="//*[contains(@class,'layui-layer-close1')]") | |
41 | + WebElement closed; | |
42 | + | |
43 | + //右上角购物车 | |
44 | + @FindBy (xpath ="//*[@id='miniCart']") | |
45 | + WebElement minicart; | |
46 | + | |
47 | + /* | |
48 | + * 页面方法 | |
49 | + */ | |
50 | + /** | |
51 | + * 进入登录页面 | |
52 | + * @return BuyerLoginPage | |
53 | + */ | |
54 | + public BuyerLoginPage toLoginPage() { | |
55 | + click(signIn); | |
56 | + return new BuyerLoginPage(driver); | |
57 | + } | |
58 | + | |
59 | + /** | |
60 | + * 进入注册页面 | |
61 | + * @return RegisterPage | |
62 | + */ | |
63 | + public RegisterPage toRegisterPage() { | |
64 | + click(register); | |
65 | + return new RegisterPage(driver); | |
66 | + } | |
67 | + | |
68 | + /** | |
69 | + * 进入购物车 | |
70 | + * @return ShoppingCartPage | |
71 | + */ | |
72 | + public ShoppingCartPage toShoppingCartPage() { | |
73 | + if (isVisibility(By.xpath("//*[@id='bind-phone']"))) { | |
74 | + click(closed); | |
75 | + } | |
76 | + click(minicart); | |
77 | + return new ShoppingCartPage(driver); | |
78 | + } | |
79 | + /** | |
80 | + * 关键字搜索商品 | |
81 | + * @return KeywordResultPage | |
82 | + */ | |
83 | + public KeywordResultPage keywordSearch() { | |
84 | + //判断是否绑定手机 | |
85 | + if (isVisibility(By.xpath("//*[@id='bind-phone']"))) { | |
86 | + click(closed); | |
87 | + } | |
88 | + //如果是非活动 | |
89 | + if (Model.getIsactivity()==0 &&(Model.getSkuNo().equals("选填,勿填活动商品")||Model.getSkuNo().equals(""))) { | |
90 | + //判断是否自定义输入商品编号 | |
91 | + String sql = "SELECT s.id,s.`no` from prd_category c\r\n" + | |
92 | + "LEFT JOIN prd_goods g on c.id = g.category_id\r\n" + | |
93 | + "LEFT JOIN prd_goods_sku s on s.goods_id = g.id\r\n" + | |
94 | + "where find_in_set(5,REPLACE(c.path,'.',','))\r\n" + | |
95 | + "AND s.`no` > 200000000\r\n" + | |
96 | + "AND s.id NOT IN (SELECT g.sku_id FROM sale_group_buy g)\r\n" + | |
97 | + "AND s.id NOT IN (SELECT t.sku_id FROM sale_shopping_cart t)\r\n" + | |
98 | + "AND s.src = 1\r\n" + | |
99 | + "AND s.`status` = 2\r\n" + | |
100 | + "AND s.is_stop_product = 0\r\n" + | |
101 | + "AND s.is_delete = 0\r\n" + | |
102 | + "limit 1"; | |
103 | + Model.setSkuNo(DBSqlSearch(sql, "no")); | |
104 | + }else if (Model.getIsactivity()==1 &&( Model.getSkuNo().equals("选填,勿填非活动中商品")||Model.getSkuNo().equals(""))) { | |
105 | + //活动商品 | |
106 | + String sql = "SELECT s.id,s.`no` from prd_category c\r\n" + | |
107 | + "LEFT JOIN prd_goods g on c.id = g.category_id\r\n" + | |
108 | + "LEFT JOIN prd_goods_sku s on s.goods_id = g.id\r\n" + | |
109 | + "LEFT JOIN sale_group_buy a on a.sku_id = s.id\r\n" + | |
110 | + "where s.`no` > 200000000\r\n" + | |
111 | + "AND s.id NOT IN (SELECT t.sku_id FROM sale_shopping_cart t)\r\n" + | |
112 | + "AND a.`status` = 20 \r\n" + | |
113 | + "limit 1;"; | |
114 | + Model.setSkuNo(DBSqlSearch(sql, "no")); | |
115 | + } | |
116 | + sendKeys(searchText, Model.getSkuNo()); | |
117 | + click(searchButton); | |
118 | + return new KeywordResultPage(driver); | |
119 | + } | |
120 | + | |
121 | + /** | |
122 | + * 断言是否注册成功,根据是否有绑定手机号的弹窗来判断 | |
123 | + * @return boolean | |
124 | + */ | |
125 | + public boolean isSucceed() { | |
126 | + return isVisibility(By.xpath("//*[contains(@class,'layui-layer-close1')]")); | |
127 | + } | |
128 | +} | ... | ... |
src/test/java/com/buyer/pageObject/KeywordResultPage.java
0 → 100644
... | ... | @@ -0,0 +1,98 @@ |
1 | +package com.buyer.pageObject; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | +import com.essa.framework.Model; | |
10 | + | |
11 | +/** | |
12 | + * 关键字查询结果页 | |
13 | + * @author Administrator | |
14 | + * | |
15 | + */ | |
16 | +public class KeywordResultPage extends BasePage { | |
17 | + public KeywordResultPage(WebDriver driver) { | |
18 | + super(driver); | |
19 | + } | |
20 | + /* | |
21 | + * 元素定位 | |
22 | + */ | |
23 | + //加入购物车 | |
24 | + @FindBy (xpath ="//*[@id='product-list']/ul[1]/div[1]/li[1]/div[1]/div[1]/div[4]/div[2]") | |
25 | + WebElement addToCart; | |
26 | + | |
27 | + @FindBy (xpath ="//*[@id='product-list']/ul[1]/div[1]/li[1]/div[2]/div[3]/div[1]") | |
28 | + WebElement confirmAdd; | |
29 | + | |
30 | + //添加购物车时,提示加入一款成功toast | |
31 | + @FindBy (xpath ="//*[@class='util-bill-pd']") | |
32 | + WebElement toast; | |
33 | + | |
34 | + //右上角购物车 | |
35 | + @FindBy (xpath ="//*[@id='miniCart']") | |
36 | + WebElement minicart; | |
37 | + | |
38 | + //订购量 | |
39 | + @FindBy (xpath="//*[contains(text(),'quantity')]/../span[2]/input") | |
40 | + WebElement count; | |
41 | + | |
42 | + //活动商品-添加购物车 | |
43 | + @FindBy (xpath ="//*[text()='Add to Cart']") | |
44 | + WebElement addToCart1; | |
45 | + | |
46 | + /* | |
47 | + * 页面方法 | |
48 | + */ | |
49 | + /** | |
50 | + * 加入到购物车中,且会进入购物车校验是否加入成功 | |
51 | + * @return ShoppingCartPage | |
52 | + */ | |
53 | + public ShoppingCartPage addToCart() { | |
54 | + //判断商品是活动中还是非活动中,此处有坑,活动如果满足要求要走代办 | |
55 | + if (Model.getIsactivity() == 0) { | |
56 | + click(addToCart); | |
57 | + forceWait(1000); | |
58 | + click(count); | |
59 | + sendKeys(count, "50"); | |
60 | + }else if (Model.getIsactivity() == 1) { | |
61 | + click(addToCart1); | |
62 | + forceWait(1000); | |
63 | + click(count); | |
64 | + sendKeys(count, "200"); | |
65 | + } | |
66 | + | |
67 | + click(confirmAdd); | |
68 | + while(!isVisibility(By.xpath("//*[@class='util-bill-pd']"))) { | |
69 | + forceWait(1000); | |
70 | + } | |
71 | + forceWait(1000); | |
72 | + click(minicart); | |
73 | + return new ShoppingCartPage(driver); | |
74 | + } | |
75 | + /** | |
76 | + * 由于操作过快,系统会提示:有人正在操作 | |
77 | + * sku加入到购物车,但不进入购物车,防止无法操作后续的拼柜 | |
78 | + * | |
79 | + */ | |
80 | + public void addSku() { | |
81 | + if (Model.getIsactivity() == 0) { | |
82 | + click(addToCart); | |
83 | + forceWait(1000); | |
84 | + click(count); | |
85 | + sendKeys(count, "50"); | |
86 | + }else if (Model.getIsactivity() == 1) { | |
87 | + click(addToCart1); | |
88 | + forceWait(1000); | |
89 | + click(count); | |
90 | + sendKeys(count, "200"); | |
91 | + } | |
92 | + click(confirmAdd); | |
93 | + while(!isVisibility(By.xpath("//*[@class='util-bill-pd']"))) { | |
94 | + forceWait(1000); | |
95 | + } | |
96 | + forceWait(1000); | |
97 | + } | |
98 | +} | ... | ... |
src/test/java/com/buyer/pageObject/MyOrderPage.java
0 → 100644
src/test/java/com/buyer/pageObject/OrderPreviewPage.java
0 → 100644
... | ... | @@ -0,0 +1,47 @@ |
1 | +package com.buyer.pageObject; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | + | |
10 | +/** | |
11 | + * @author Administrator | |
12 | + *订单预览页 | |
13 | + */ | |
14 | +public class OrderPreviewPage extends BasePage { | |
15 | + public OrderPreviewPage(WebDriver driver) { | |
16 | + super(driver); | |
17 | + } | |
18 | + | |
19 | + //是否授权:同意 | |
20 | + @FindBy (xpath ="//*[@ng-checked='list.isAuthorExchange==1']") | |
21 | + WebElement agree; | |
22 | + | |
23 | + //提交po | |
24 | + @FindBy (xpath ="//*[@id='react-orderConfirmation-submit']") | |
25 | + WebElement sendPO; | |
26 | + | |
27 | + //弹框:确认 | |
28 | + @FindBy (xpath ="//a[text()='Send PO']") | |
29 | + WebElement confirm; | |
30 | + | |
31 | + /** | |
32 | + * 提交po | |
33 | + * @return PayDepositPage | |
34 | + */ | |
35 | + public PayDepositPage submit() { | |
36 | + while(!(isVisibility(By.xpath("//*[@ng-checked='list.isAuthorExchange==1']")))) { | |
37 | + forceWait(1000); | |
38 | + } | |
39 | + moveHeightScroll("50"); | |
40 | + forceWait(500); | |
41 | + jsExecutorClick(agree); | |
42 | + click(sendPO); | |
43 | + forceWait(1000); | |
44 | + click(confirm); | |
45 | + return new PayDepositPage(driver); | |
46 | + } | |
47 | +} | ... | ... |
src/test/java/com/buyer/pageObject/PayDepositPage.java
0 → 100644
... | ... | @@ -0,0 +1,68 @@ |
1 | +package com.buyer.pageObject; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | +import com.essa.framework.Model; | |
10 | + | |
11 | +/** | |
12 | + * @author Administrator | |
13 | + *支付定金页 | |
14 | + */ | |
15 | +public class PayDepositPage extends BasePage { | |
16 | + public PayDepositPage(WebDriver driver) { | |
17 | + super(driver); | |
18 | + } | |
19 | + | |
20 | + //PO信息 | |
21 | + @FindBy (xpath="//*[contains(text(),'PO information')]") | |
22 | + WebElement POInfo; | |
23 | + | |
24 | + //查看资金详情---可用资金不足 | |
25 | + @FindBy (xpath ="//button[@class='submit-payment-deposit-button btn btn-primary']") | |
26 | + WebElement FundDetail; | |
27 | + | |
28 | + //免定金模式--确认按钮 | |
29 | + @FindBy (xpath ="//*[@ng-click='submit()']") | |
30 | + WebElement ok; | |
31 | + | |
32 | + //po单号 | |
33 | + @FindBy (xpath ="//*[contains(text(),'PO number:')]/../../td[2]/span") | |
34 | + WebElement poNum; | |
35 | + | |
36 | + /** | |
37 | + * 查看资金详情 | |
38 | + * @return AssetManagementPage | |
39 | + */ | |
40 | + public AssetManagementPage toAssetManagementPage() { | |
41 | + click(FundDetail); | |
42 | + return new AssetManagementPage(driver); | |
43 | + } | |
44 | + | |
45 | + /** | |
46 | + * 确认PO | |
47 | + * @return MyOrderPage | |
48 | + */ | |
49 | + public MyOrderPage confirm() { | |
50 | + click(ok); | |
51 | + return new MyOrderPage(driver); | |
52 | + } | |
53 | + | |
54 | + public void operate() { | |
55 | + while (!(isVisibility(By.xpath("//*[contains(text(),'PO information')]")))) { | |
56 | + forceWait(1000); | |
57 | + } | |
58 | + Model.setPoNum(poNum.getText()); | |
59 | + if (isVisibility(By.xpath("//button[@class='submit-payment-deposit-button btn btn-primary']"))) { | |
60 | + //如果是可用资金不足,跳转到资金管理 | |
61 | + toAssetManagementPage(); | |
62 | + }else if (isVisibility(By.xpath("//*[@ng-click='submit()']"))) { | |
63 | + //免定金模式,确认po,跳转到我的订单列表 | |
64 | + confirm(); | |
65 | + } | |
66 | + forceWait(2000); | |
67 | + } | |
68 | +} | ... | ... |
src/test/java/com/buyer/pageObject/RegisterPage.java
0 → 100644
... | ... | @@ -0,0 +1,165 @@ |
1 | +package com.buyer.pageObject; | |
2 | + | |
3 | +import java.text.SimpleDateFormat; | |
4 | +import java.util.Date; | |
5 | + | |
6 | +import org.openqa.selenium.WebDriver; | |
7 | +import org.openqa.selenium.WebElement; | |
8 | +import org.openqa.selenium.support.FindBy; | |
9 | + | |
10 | +import com.essa.framework.BasePage; | |
11 | +import com.essa.framework.Model; | |
12 | +import com.essa.framework.Tools; | |
13 | + | |
14 | +/** | |
15 | + * 采购商注册页 | |
16 | + * @author Administrator | |
17 | + * | |
18 | + */ | |
19 | +public class RegisterPage extends BasePage { | |
20 | + public RegisterPage(WebDriver driver) { | |
21 | + super(driver); | |
22 | + } | |
23 | + /* | |
24 | + * 元素定位 | |
25 | + */ | |
26 | + //检查点-是否进入页面 | |
27 | + @FindBy (xpath ="//*[contains(text(),' Own essa.cn account')]") | |
28 | + WebElement checkPoint; | |
29 | + | |
30 | ||
31 | + @FindBy (xpath ="//*[@id='email']") | |
32 | + WebElement email; | |
33 | + | |
34 | + //password | |
35 | + @FindBy (xpath ="//*[@id='password']") | |
36 | + WebElement password; | |
37 | + | |
38 | + //confirmPassword | |
39 | + @FindBy (xpath ="//*[@id='confirmPassword']") | |
40 | + WebElement confirmPassword; | |
41 | + | |
42 | + //币种 currency | |
43 | + @FindBy (xpath ="//*[@id='currPlaceholder']") | |
44 | + WebElement currPlaceholder; | |
45 | + | |
46 | + //CNY | |
47 | + @FindBy (xpath="//*[text()='CNY']") | |
48 | + WebElement CNY; | |
49 | + | |
50 | + //companyName | |
51 | + @FindBy (xpath="//*[@id='companyName']") | |
52 | + WebElement companyName; | |
53 | + | |
54 | + //空白的地方-用于关闭选项框 | |
55 | + @FindBy (xpath ="//*[@class='register-right']") | |
56 | + WebElement blank; | |
57 | + | |
58 | + //区域continent | |
59 | + @FindBy (xpath ="//*[@id='continentPlaceholder']") | |
60 | + WebElement continentPlaceholder; | |
61 | + | |
62 | + //欧洲europe | |
63 | + @FindBy (xpath="//*[text()='Europe']") | |
64 | + WebElement Europe; | |
65 | + | |
66 | + //country | |
67 | + @FindBy (xpath ="//*[@id='countryPlaceholder']") | |
68 | + WebElement country; | |
69 | + | |
70 | + //俄罗斯Russian | |
71 | + @FindBy (xpath ="//*[text()='Russian federation']") | |
72 | + WebElement Russian; | |
73 | + | |
74 | + //contactName | |
75 | + @FindBy (xpath ="//*[@id='contactName']") | |
76 | + WebElement contactName; | |
77 | + | |
78 | + //phone | |
79 | + @FindBy (xpath ="//*[@id='phone']") | |
80 | + WebElement phone; | |
81 | + | |
82 | + //purchaseQuantity | |
83 | + @FindBy (xpath ="//*[@id='purchaseQuantity']") | |
84 | + WebElement purchaseQuantity; | |
85 | + | |
86 | + //quantity | |
87 | + @FindBy (xpath ="//*[contains(text(),'1 000 000 - 2 500 000 USD')]") | |
88 | + WebElement quantity; | |
89 | + | |
90 | + //singleQuantity | |
91 | + @FindBy (xpath ="//*[@id='singleQuantity']") | |
92 | + WebElement singleQuantity; | |
93 | + | |
94 | + //single | |
95 | + @FindBy (xpath ="//*[text()='30-49 ctn']") | |
96 | + WebElement single; | |
97 | + | |
98 | + //select | |
99 | + @FindBy (xpath ="//*[text()='Select']") | |
100 | + WebElement select; | |
101 | + | |
102 | + //toys1 | |
103 | + @FindBy (xpath ="//*[@title='Animals&plants']") | |
104 | + WebElement toys1; | |
105 | + | |
106 | + //toys2 | |
107 | + @FindBy (xpath ="//*[text()='Dolls and accessories']") | |
108 | + WebElement toys2; | |
109 | + | |
110 | + //toys3 | |
111 | + @FindBy (xpath ="//*[text()='Bricks']") | |
112 | + WebElement toys3; | |
113 | + | |
114 | + //referralCode | |
115 | + @FindBy (xpath ="//*[@id='referralCode']") | |
116 | + WebElement referralCode; | |
117 | + | |
118 | + //checkBox | |
119 | + @FindBy (xpath ="//*[@id='protocol']") | |
120 | + WebElement checkbox; | |
121 | + | |
122 | + //Register | |
123 | + @FindBy (xpath ="//*[@id='submit']") | |
124 | + WebElement register; | |
125 | + | |
126 | + /* | |
127 | + * 页面方法 | |
128 | + */ | |
129 | + /** | |
130 | + * 注册 | |
131 | + * @return IndexPage | |
132 | + */ | |
133 | + public IndexPage register() { | |
134 | + SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmm"); | |
135 | + String num = Tools.getTime(); | |
136 | + sendKeys(email, Model.getEmail()); | |
137 | + sendKeys(password, "essa123"); | |
138 | + sendKeys(confirmPassword, "essa123"); | |
139 | + click(currPlaceholder); | |
140 | + click(CNY); | |
141 | + sendKeys(companyName, "Auto"+num); | |
142 | + click(continentPlaceholder); | |
143 | + click(Europe); | |
144 | + click(Russian); | |
145 | + sendKeys(contactName, "Tester"+num); | |
146 | + sendKeys(phone, format.format(new Date())); | |
147 | + forceWait(500); | |
148 | + click(purchaseQuantity); | |
149 | + click(quantity); | |
150 | + forceWait(500); | |
151 | + click(singleQuantity); | |
152 | + click(single); | |
153 | + moveHeightScroll("100"); | |
154 | + jsExecutorClick(select); | |
155 | + click(toys1); | |
156 | + click(toys2); | |
157 | + click(toys3); | |
158 | + click(blank); | |
159 | + sendKeys(referralCode, Model.getInvateCode()); | |
160 | + jsExecutorClick(checkbox); | |
161 | + click(register); | |
162 | + forceWait(3000); | |
163 | + return new IndexPage(driver); | |
164 | + } | |
165 | +} | ... | ... |
src/test/java/com/buyer/pageObject/SettingMarksPage.java
0 → 100644
... | ... | @@ -0,0 +1,45 @@ |
1 | +package com.buyer.pageObject; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | + | |
10 | +/** | |
11 | + * 设置唛头页 | |
12 | + * @author Administrator | |
13 | + * | |
14 | + */ | |
15 | +public class SettingMarksPage extends BasePage { | |
16 | + public SettingMarksPage(WebDriver driver) { | |
17 | + super(driver); | |
18 | + } | |
19 | + //不应用唛头 | |
20 | + @FindBy (xpath ="//*[@title='No shipping marks for these products']") | |
21 | + WebElement noNeedMarks; | |
22 | + | |
23 | + //下一步 | |
24 | + @FindBy (xpath ="//*[text()='Next step']") | |
25 | + WebElement next; | |
26 | + | |
27 | + //弹框提示-确定 | |
28 | + @FindBy (xpath ="//*[text()='OK']") | |
29 | + WebElement ok; | |
30 | + | |
31 | + /** | |
32 | + * 设置唛头:不应用唛头 | |
33 | + * @return SettingStickerPage | |
34 | + */ | |
35 | + public SettingStickerPage setMarks() { | |
36 | + while(!(isVisibility(By.xpath("//*[@title='No shipping marks for these products']")))) { | |
37 | + forceWait(1000); | |
38 | + } | |
39 | + click(noNeedMarks); | |
40 | + click(next); | |
41 | + forceWait(500); | |
42 | + click(ok); | |
43 | + return new SettingStickerPage(driver); | |
44 | + } | |
45 | +} | ... | ... |
src/test/java/com/buyer/pageObject/SettingStickerPage.java
0 → 100644
... | ... | @@ -0,0 +1,43 @@ |
1 | +package com.buyer.pageObject; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | + | |
10 | +/** | |
11 | + * @author Administrator | |
12 | + *设置贴纸页 | |
13 | + */ | |
14 | +public class SettingStickerPage extends BasePage { | |
15 | + public SettingStickerPage(WebDriver driver) { | |
16 | + super(driver); | |
17 | + } | |
18 | + //不应用贴纸 | |
19 | + @FindBy (xpath ="//*[@title='No stickers for these products']") | |
20 | + WebElement noNeedSticker; | |
21 | + | |
22 | + //下一步 | |
23 | + @FindBy (xpath ="//*[text()='Next step']") | |
24 | + WebElement next; | |
25 | + | |
26 | + //弹框提示-确定 | |
27 | + @FindBy (xpath ="//*[text()='OK']") | |
28 | + WebElement ok; | |
29 | + | |
30 | + /** | |
31 | + * 设置贴纸:不应用贴纸 | |
32 | + * @return OrderPreviewPage | |
33 | + */ | |
34 | + public OrderPreviewPage setSticker() { | |
35 | + while (!(isVisibility(By.xpath("//*[@title='No stickers for these products']")))) { | |
36 | + forceWait(1000); | |
37 | + } | |
38 | + click(noNeedSticker); | |
39 | + click(next); | |
40 | + click(ok); | |
41 | + return new OrderPreviewPage(driver); | |
42 | + } | |
43 | +} | ... | ... |
src/test/java/com/buyer/pageObject/ShoppingCartPage.java
0 → 100644
... | ... | @@ -0,0 +1,70 @@ |
1 | +package com.buyer.pageObject; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | +import com.essa.framework.Model; | |
10 | + | |
11 | +/** | |
12 | + * 购物车页 | |
13 | + * @author Administrator | |
14 | + * | |
15 | + */ | |
16 | +public class ShoppingCartPage extends BasePage { | |
17 | + public ShoppingCartPage(WebDriver driver) { | |
18 | + super(driver); | |
19 | + } | |
20 | + /* | |
21 | + * 元素定位 | |
22 | + */ | |
23 | + //关键字查询框 | |
24 | + @FindBy (xpath ="//*[@ng-model='keyword']") | |
25 | + WebElement keyword; | |
26 | + | |
27 | + //查询按钮 | |
28 | + @FindBy (xpath ="//*[contains(@ng-click,'search()')]") | |
29 | + WebElement searchButton; | |
30 | + | |
31 | + //搜索结果的一个sku对应的复选框 | |
32 | + @FindBy (xpath ="//*[contains(@class,'products-list ng-scope')]/div[2]/div[2]/span[1]/input") | |
33 | + WebElement checkbox; | |
34 | + | |
35 | + //可拼柜 | |
36 | + @FindBy (xpath="//*[text()='Consolidation allowed']") | |
37 | + WebElement consolidationAllowed; | |
38 | + | |
39 | + //开始拼柜 | |
40 | + @FindBy (xpath ="//button[contains(text(),' Start consolidation')]") | |
41 | + WebElement startConslidation; | |
42 | + | |
43 | + /* | |
44 | + * 页面方法 | |
45 | + */ | |
46 | + /** | |
47 | + * 断言sku是否已经加入购物车 | |
48 | + * @return true:已加入 false:未加入 | |
49 | + */ | |
50 | + public boolean isSucceed() { | |
51 | + mywait(keyword); | |
52 | + sendKeys(keyword, Model.getSkuNo()); | |
53 | + click(searchButton); | |
54 | + mywait(checkbox); | |
55 | + forceWait(2000); | |
56 | + return isVisibility(By.xpath("//*[contains(text(),'"+Model.getSkuNo()+"')]")); | |
57 | + } | |
58 | + /** | |
59 | + * 开始拼柜 | |
60 | + * @return ConslidationPage | |
61 | + */ | |
62 | + public ConslidationPage startConslidation() { | |
63 | + mywait(keyword); | |
64 | + click(consolidationAllowed); | |
65 | + mywait(startConslidation); | |
66 | + click(startConslidation); | |
67 | + return new ConslidationPage(driver); | |
68 | + } | |
69 | + | |
70 | +} | ... | ... |
src/test/java/com/buyer/testSuite/TestAddToCart.java
0 → 100644
... | ... | @@ -0,0 +1,63 @@ |
1 | +package com.buyer.testSuite; | |
2 | + | |
3 | +import org.openqa.selenium.WebDriver; | |
4 | +import org.openqa.selenium.support.PageFactory; | |
5 | +import org.testng.annotations.AfterClass; | |
6 | +import org.testng.annotations.BeforeClass; | |
7 | +import org.testng.annotations.Test; | |
8 | +import org.testng.asserts.SoftAssert; | |
9 | + | |
10 | +import com.buyer.pageObject.IndexPage; | |
11 | +import com.buyer.pageObject.KeywordResultPage; | |
12 | +import com.buyer.pageObject.ShoppingCartPage; | |
13 | +import com.essa.framework.Model; | |
14 | +import com.essa.pageObject.BaseTest; | |
15 | + | |
16 | +/** | |
17 | + * @author Administrator | |
18 | + *测试用例:采购商平台采购流程 | |
19 | + */ | |
20 | +public class TestAddToCart extends BaseTest { | |
21 | + WebDriver driver; | |
22 | + | |
23 | + @BeforeClass | |
24 | + public void setUp() { | |
25 | + initBuyer(); | |
26 | + loginBuyerValid(Model.getBuyerAccount(),Model.getBuyerPassword()); | |
27 | +// loginBuyerValid("buyer51551@essa.cn","essa123"); | |
28 | + } | |
29 | + @AfterClass | |
30 | + public void tearDown() { | |
31 | + driver.quit(); | |
32 | + } | |
33 | + | |
34 | + /** | |
35 | + * 关键字查询,并将搜到的结果加入购物车 | |
36 | + */ | |
37 | + @Test(description="关键字搜索,并将sku加入购物车") | |
38 | + public void keywordToCart() { | |
39 | + this.driver = getDriver(); | |
40 | + IndexPage indexPage = PageFactory.initElements(driver, IndexPage.class); | |
41 | + indexPage.keywordSearch(); | |
42 | + KeywordResultPage keywordResultPage = PageFactory.initElements(driver, KeywordResultPage.class); | |
43 | + keywordResultPage.addToCart(); | |
44 | + //断言 | |
45 | + ShoppingCartPage shoppingCartPage = PageFactory.initElements(driver, ShoppingCartPage.class); | |
46 | + boolean actual = shoppingCartPage.isSucceed(); | |
47 | + SoftAssert softAssert = new SoftAssert(); | |
48 | + softAssert.assertEquals(actual, true, "加入购物车失败!"); | |
49 | + softAssert.assertAll(); | |
50 | + } | |
51 | + | |
52 | + /** | |
53 | + * 关键字查询,加入购物车,但不进入购物车,防止提示有人正在操作 | |
54 | + */ | |
55 | + @Test(description="将sku加入购物车") | |
56 | + public void addSku() { | |
57 | + this.driver = getDriver(); | |
58 | + IndexPage indexPage = PageFactory.initElements(driver, IndexPage.class); | |
59 | + indexPage.keywordSearch(); | |
60 | + KeywordResultPage keywordResultPage = PageFactory.initElements(driver, KeywordResultPage.class); | |
61 | + keywordResultPage.addSku(); | |
62 | + } | |
63 | +} | ... | ... |
src/test/java/com/buyer/testSuite/TestRegister.java
0 → 100644
... | ... | @@ -0,0 +1,45 @@ |
1 | +package com.buyer.testSuite; | |
2 | + | |
3 | +import org.openqa.selenium.WebDriver; | |
4 | +import org.openqa.selenium.support.PageFactory; | |
5 | +import org.testng.annotations.AfterClass; | |
6 | +import org.testng.annotations.BeforeClass; | |
7 | +import org.testng.annotations.Test; | |
8 | +import org.testng.asserts.SoftAssert; | |
9 | + | |
10 | +import com.buyer.pageObject.IndexPage; | |
11 | +import com.buyer.pageObject.RegisterPage; | |
12 | +import com.essa.pageObject.BaseTest; | |
13 | + | |
14 | +/** | |
15 | + * @author Administrator | |
16 | + *测试用例:采购商注册信息填写 | |
17 | + */ | |
18 | +public class TestRegister extends BaseTest{ | |
19 | + WebDriver driver; | |
20 | + | |
21 | + @BeforeClass | |
22 | + public void setUp() { | |
23 | + initBuyer(); | |
24 | + } | |
25 | + | |
26 | + /** | |
27 | + * 注册buyer | |
28 | + */ | |
29 | + @Test(description="填写注册采购商信息,注册采购商") | |
30 | + public void register() { | |
31 | + this.driver = getDriver(); | |
32 | + IndexPage indexPage = PageFactory.initElements(driver, IndexPage.class); | |
33 | + indexPage.toRegisterPage(); | |
34 | + RegisterPage registerPage = PageFactory.initElements(driver, RegisterPage.class); | |
35 | + registerPage.register(); | |
36 | + | |
37 | + SoftAssert softAssert = new SoftAssert(); | |
38 | + softAssert.assertEquals(indexPage.isSucceed(), true, "采购商注册失败了!"); | |
39 | + softAssert.assertAll(); | |
40 | + } | |
41 | + @AfterClass | |
42 | + public void tearDown() { | |
43 | + driver.quit(); | |
44 | + } | |
45 | +} | ... | ... |
... | ... | @@ -0,0 +1,64 @@ |
1 | +package com.buyer.testSuite; | |
2 | + | |
3 | +import org.openqa.selenium.WebDriver; | |
4 | +import org.openqa.selenium.support.PageFactory; | |
5 | +import org.testng.annotations.AfterClass; | |
6 | +import org.testng.annotations.BeforeClass; | |
7 | +import org.testng.annotations.Test; | |
8 | +import com.buyer.pageObject.ConslidationPage; | |
9 | +import com.buyer.pageObject.IndexPage; | |
10 | +import com.buyer.pageObject.OrderPreviewPage; | |
11 | +import com.buyer.pageObject.PayDepositPage; | |
12 | +import com.buyer.pageObject.SettingMarksPage; | |
13 | +import com.buyer.pageObject.SettingStickerPage; | |
14 | +import com.buyer.pageObject.ShoppingCartPage; | |
15 | +import com.essa.framework.Model; | |
16 | +import com.essa.pageObject.BaseTest; | |
17 | + | |
18 | +/** | |
19 | + * @author Administrator | |
20 | + *测试用例:采购商平台采购流程 | |
21 | + */ | |
22 | +public class TestSendPO extends BaseTest { | |
23 | + WebDriver driver; | |
24 | + | |
25 | + @BeforeClass | |
26 | + public void setUp() { | |
27 | + initBuyer(); | |
28 | + loginBuyerValid(Model.getBuyerAccount(),Model.getBuyerPassword()); | |
29 | +// loginBuyerValid("buyer51551@essa.cn","essa123"); | |
30 | + } | |
31 | + @AfterClass | |
32 | + public void tearDown() { | |
33 | + driver.quit(); | |
34 | + } | |
35 | + | |
36 | + /** | |
37 | + * 开始拼柜 | |
38 | + */ | |
39 | + @Test(description="开始拼柜") | |
40 | + public void conslidation() { | |
41 | + this.driver = getDriver(); | |
42 | + IndexPage indexPage = PageFactory.initElements(driver, IndexPage.class); | |
43 | + indexPage.toShoppingCartPage(); | |
44 | + ShoppingCartPage shoppingCartPage = PageFactory.initElements(driver, ShoppingCartPage.class); | |
45 | + shoppingCartPage.startConslidation(); | |
46 | + ConslidationPage conslidationPage = PageFactory.initElements(driver, ConslidationPage.class); | |
47 | + conslidationPage.conslidation(); | |
48 | + } | |
49 | + /** | |
50 | + * 提交PO | |
51 | + */ | |
52 | + @Test(description="设置贴纸唛头,提交PO") | |
53 | + public void sendPO() { | |
54 | + this.driver = getDriver(); | |
55 | + SettingMarksPage settingMarksPage = PageFactory.initElements(driver, SettingMarksPage.class); | |
56 | + settingMarksPage.setMarks(); | |
57 | + SettingStickerPage settingStickerPage = PageFactory.initElements(driver, SettingStickerPage.class); | |
58 | + settingStickerPage.setSticker(); | |
59 | + OrderPreviewPage orderPreviewPage = PageFactory.initElements(driver, OrderPreviewPage.class); | |
60 | + orderPreviewPage.submit(); | |
61 | + PayDepositPage payDepositPage = PageFactory.initElements(driver, PayDepositPage.class); | |
62 | + payDepositPage.operate(); | |
63 | + } | |
64 | +} | ... | ... |
... | ... | @@ -0,0 +1,74 @@ |
1 | +package com.essa.framework; | |
2 | + | |
3 | +public class DBInfo { | |
4 | + | |
5 | + //sit | |
6 | + public static String sitJdbcName = "com.mysql.cj.jdbc.Driver"; | |
7 | + public static String sitSqlUrl = "jdbc:mysql://192.168.1.247:3307/bpms"; | |
8 | + public static String sitUser = "root"; | |
9 | + public static String sitPassword = "redhat"; | |
10 | + //hotfix | |
11 | + public static String hotfixJdbcName = "com.mysql.cj.jdbc.Driver"; | |
12 | + public static String hotfixSqlUrl = "jdbc:mysql://192.168.1.19:3321/bpms"; | |
13 | + public static String hotfixUser = "essa_hotfix"; | |
14 | + public static String hotfixPassword = "essa^_hotfix^D<K123"; | |
15 | + //dit | |
16 | + public static String ditJdbcName; | |
17 | + public static String ditSqlUrl; | |
18 | + public static String ditUser; | |
19 | + public static String ditPassword; | |
20 | + //uat | |
21 | + public static String uatJdbcName = "com.mysql.cj.jdbc.Driver"; | |
22 | + public static String uatSqlUrl = "jdbc:mysql://112.74.135.97:3325/bpms"; | |
23 | + public static String uatUser = "essa_uat"; | |
24 | + public static String uatPassword = "lXI!RqH6thvmMNNh"; | |
25 | + | |
26 | + public static String getSitJdbcName() { | |
27 | + return sitJdbcName; | |
28 | + } | |
29 | + public static String getSitSqlUrl() { | |
30 | + return sitSqlUrl; | |
31 | + } | |
32 | + public static String getSitUser() { | |
33 | + return sitUser; | |
34 | + } | |
35 | + public static String getSitPassword() { | |
36 | + return sitPassword; | |
37 | + } | |
38 | + public static String getHotfixJdbcName() { | |
39 | + return hotfixJdbcName; | |
40 | + } | |
41 | + public static String getHotfixSqlUrl() { | |
42 | + return hotfixSqlUrl; | |
43 | + } | |
44 | + public static String getHotfixUser() { | |
45 | + return hotfixUser; | |
46 | + } | |
47 | + public static String getHotfixPassword() { | |
48 | + return hotfixPassword; | |
49 | + } | |
50 | + public static String getDitJdbcName() { | |
51 | + return ditJdbcName; | |
52 | + } | |
53 | + public static String getDitSqlUrl() { | |
54 | + return ditSqlUrl; | |
55 | + } | |
56 | + public static String getDitUser() { | |
57 | + return ditUser; | |
58 | + } | |
59 | + public static String getDitPassword() { | |
60 | + return ditPassword; | |
61 | + } | |
62 | + public static String getUatJdbcName() { | |
63 | + return uatJdbcName; | |
64 | + } | |
65 | + public static String getUatSqlUrl() { | |
66 | + return uatSqlUrl; | |
67 | + } | |
68 | + public static String getUatUser() { | |
69 | + return uatUser; | |
70 | + } | |
71 | + public static String getUatPassword() { | |
72 | + return uatPassword; | |
73 | + } | |
74 | +} | ... | ... |
... | ... | @@ -0,0 +1,143 @@ |
1 | +package com.essa.framework; | |
2 | + | |
3 | +import java.sql.Connection; | |
4 | +import java.sql.DriverManager; | |
5 | +import java.sql.ResultSet; | |
6 | +import java.sql.SQLException; | |
7 | + | |
8 | +import com.mysql.cj.api.jdbc.Statement; | |
9 | +import com.mysql.cj.jdbc.CallableStatement; | |
10 | +import com.mysql.cj.jdbc.PreparedStatement; | |
11 | + | |
12 | +public class DButil { | |
13 | + // 数据库驱动名字 | |
14 | + private static String jdbcName = null; | |
15 | + // 数据库协议地址 | |
16 | + private static String dbUrl = null; | |
17 | + // 数据库用户名 | |
18 | + private static String dbUser = null; | |
19 | + // 数据库密码 | |
20 | + private static String dbPassword = null; | |
21 | + | |
22 | + public static Connection getCon() { | |
23 | + Connection conn = null; | |
24 | + if ("SIT".equals(Model.getEnv())) { | |
25 | + try { | |
26 | + jdbcName = DBInfo.getSitJdbcName(); | |
27 | + dbUrl = DBInfo.getSitSqlUrl(); | |
28 | + dbUser = DBInfo.getSitUser(); | |
29 | + dbPassword = DBInfo.getSitPassword(); | |
30 | + Class.forName(jdbcName); | |
31 | + conn = DriverManager.getConnection(dbUrl, dbUser, dbPassword); | |
32 | + return conn; | |
33 | + } catch (Exception e) { | |
34 | + e.printStackTrace(); | |
35 | + } | |
36 | + } else if ("HOTFIX".equals(Model.getEnv())) { | |
37 | + try { | |
38 | + jdbcName = DBInfo.getHotfixJdbcName(); | |
39 | + dbUrl = DBInfo.getHotfixSqlUrl(); | |
40 | + dbUser = DBInfo.getHotfixUser(); | |
41 | + dbPassword = DBInfo.getHotfixPassword(); | |
42 | + Class.forName(jdbcName); | |
43 | + conn = DriverManager.getConnection(dbUrl, dbUser, dbPassword); | |
44 | + return conn; | |
45 | + } catch (Exception e) { | |
46 | + e.printStackTrace(); | |
47 | + } | |
48 | + } else if ("DIT".equals(Model.getEnv())) { | |
49 | + try { | |
50 | + jdbcName = DBInfo.getDitJdbcName(); | |
51 | + dbUrl = DBInfo.getDitSqlUrl(); | |
52 | + dbUser = DBInfo.getDitUser(); | |
53 | + dbPassword = DBInfo.getDitPassword(); | |
54 | + Class.forName(jdbcName); | |
55 | + conn = DriverManager.getConnection(dbUrl, dbUser, dbPassword); | |
56 | + return conn; | |
57 | + } catch (Exception e) { | |
58 | + e.printStackTrace(); | |
59 | + } | |
60 | + } else if ("UAT".equals(Model.getEnv())) { | |
61 | + try { | |
62 | + jdbcName = DBInfo.getUatJdbcName(); | |
63 | + dbUrl = DBInfo.getUatSqlUrl(); | |
64 | + dbUser = DBInfo.getUatUser(); | |
65 | + dbPassword = DBInfo.getUatPassword(); | |
66 | + Class.forName(jdbcName); | |
67 | + conn = DriverManager.getConnection(dbUrl, dbUser, dbPassword); | |
68 | + return conn; | |
69 | + } catch (Exception e) { | |
70 | + e.printStackTrace(); | |
71 | + } | |
72 | + } | |
73 | + return null; | |
74 | + } | |
75 | + | |
76 | + /** | |
77 | + * 关闭连接 | |
78 | + * | |
79 | + * @param stmt | |
80 | + * @param conn | |
81 | + * @throws Exception | |
82 | + */ | |
83 | + public static void close(Statement stmt, Connection conn) throws Exception { | |
84 | + if (stmt != null) { | |
85 | + stmt.close(); | |
86 | + if (conn != null) { | |
87 | + conn.close(); | |
88 | + } | |
89 | + } | |
90 | + } | |
91 | + | |
92 | + /** | |
93 | + * 关闭连接 | |
94 | + * | |
95 | + * @param cstmt | |
96 | + * @param conn | |
97 | + * @throws Exception | |
98 | + */ | |
99 | + public static void close(CallableStatement cstmt, Connection conn) throws Exception { | |
100 | + if (cstmt != null) { | |
101 | + cstmt.close(); | |
102 | + if (conn != null) { | |
103 | + conn.close(); | |
104 | + } | |
105 | + } | |
106 | + } | |
107 | + | |
108 | + /** | |
109 | + * 关闭连接 | |
110 | + * | |
111 | + * @param pstmt | |
112 | + * @param conn | |
113 | + * @throws SQLException | |
114 | + */ | |
115 | + public static void close(PreparedStatement pstmt, Connection conn) throws SQLException { | |
116 | + if (pstmt != null) { | |
117 | + pstmt.close(); | |
118 | + if (conn != null) { | |
119 | + conn.close(); | |
120 | + } | |
121 | + } | |
122 | + } | |
123 | + | |
124 | + /** | |
125 | + * 重载关闭方法 | |
126 | + * | |
127 | + * @param rs | |
128 | + * @param pstmt | |
129 | + * @param conn | |
130 | + * @throws Exception | |
131 | + */ | |
132 | + public static void close(ResultSet rs, PreparedStatement pstmt, Connection conn) throws Exception { | |
133 | + if (rs != null) { | |
134 | + rs.close(); | |
135 | + if (pstmt != null) { | |
136 | + pstmt.close(); | |
137 | + if (conn != null) { | |
138 | + conn.close(); | |
139 | + } | |
140 | + } | |
141 | + } | |
142 | + } | |
143 | +} | ... | ... |
... | ... | @@ -0,0 +1,110 @@ |
1 | +package com.essa.framework; | |
2 | + | |
3 | +/** | |
4 | + * @author Administrator | |
5 | + *pojo对象,用于存储一些运行过程中的变量 | |
6 | + */ | |
7 | +public class Model { | |
8 | + | |
9 | + public static String skuNo;//商品编号 | |
10 | + public static String buyerNo;//采购商编号 | |
11 | + public static String supplierName;//供应商名称 | |
12 | + public static String picPath;//图片路径 | |
13 | + public static String email = "buyer"+Tools.getTime()+"@essa.cn";//采购商邮箱 | |
14 | + public static String invateCode;//邀请码 | |
15 | + public static String env;//所选环境 | |
16 | + public static String buyerAccount;//采购商账号 | |
17 | + public static String buyerPassword;//采购商密码 | |
18 | + public static String poNum;//po单号 | |
19 | + public static int isactivity;//是否是活动商品 1:是 0:否 | |
20 | + | |
21 | + | |
22 | + public static int getIsactivity() { | |
23 | + return isactivity; | |
24 | + } | |
25 | + | |
26 | + public static void setIsactivity(int isactivity) { | |
27 | + Model.isactivity = isactivity; | |
28 | + } | |
29 | + | |
30 | + public static String getPoNum() { | |
31 | + return poNum; | |
32 | + } | |
33 | + | |
34 | + public static void setPoNum(String poNum) { | |
35 | + Model.poNum = poNum; | |
36 | + } | |
37 | + | |
38 | + public static String getBuyerAccount() { | |
39 | + return buyerAccount; | |
40 | + } | |
41 | + | |
42 | + public static void setBuyerAccount(String buyerAccount) { | |
43 | + Model.buyerAccount = buyerAccount; | |
44 | + } | |
45 | + | |
46 | + public static String getBuyerPassword() { | |
47 | + return buyerPassword; | |
48 | + } | |
49 | + | |
50 | + public static void setBuyerPassword(String buyerPassword) { | |
51 | + Model.buyerPassword = buyerPassword; | |
52 | + } | |
53 | + | |
54 | + public static String getEnv() { | |
55 | + return env; | |
56 | + } | |
57 | + | |
58 | + public static void setEnv(String env) { | |
59 | + Model.env = env; | |
60 | + } | |
61 | + | |
62 | + public static String getInvateCode() { | |
63 | + return invateCode; | |
64 | + } | |
65 | + | |
66 | + public static void setInvateCode(String invateCode) { | |
67 | + Model.invateCode = invateCode; | |
68 | + } | |
69 | + | |
70 | + public static String getEmail() { | |
71 | + return email; | |
72 | + } | |
73 | + | |
74 | + public static void setEmail(String email) { | |
75 | + Model.email = email; | |
76 | + } | |
77 | + | |
78 | + public static String getPicPath() { | |
79 | + return picPath; | |
80 | + } | |
81 | + | |
82 | + public static void setPicPath(String picPath) { | |
83 | + Model.picPath = picPath; | |
84 | + } | |
85 | + | |
86 | + public static String getSupplierName() { | |
87 | + return supplierName; | |
88 | + } | |
89 | + | |
90 | + public static void setSupplierName(String supplierName) { | |
91 | + Model.supplierName = supplierName; | |
92 | + } | |
93 | + | |
94 | + public static String getBuyerNo() { | |
95 | + return buyerNo; | |
96 | + } | |
97 | + | |
98 | + public static void setBuyerNo(String buyerNo) { | |
99 | + Model.buyerNo = buyerNo; | |
100 | + } | |
101 | + | |
102 | + public static String getSkuNo() { | |
103 | + return skuNo; | |
104 | + } | |
105 | + | |
106 | + public static void setSkuNo(String No) { | |
107 | + skuNo = No; | |
108 | + } | |
109 | + | |
110 | +} | ... | ... |
... | ... | @@ -0,0 +1,41 @@ |
1 | +package com.essa.framework; | |
2 | + | |
3 | +import java.text.SimpleDateFormat; | |
4 | +import java.util.Date; | |
5 | + | |
6 | +public class Tools { | |
7 | + | |
8 | + /** | |
9 | + * 获取当前时间 | |
10 | + * @return MMdd_HHmmss | |
11 | + */ | |
12 | + public static String getCurrentTime() { | |
13 | + SimpleDateFormat format = new SimpleDateFormat("MMdd_HHmmss"); | |
14 | + Date today = new Date(); | |
15 | + String time = format.format(today); | |
16 | + return time; | |
17 | + } | |
18 | + /** | |
19 | + * 使用当前时间作为工厂货号 | |
20 | + * @return yyyyMMddHHmmss | |
21 | + */ | |
22 | + public static String getFactoryNo() { | |
23 | + SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss"); | |
24 | + Date today = new Date(); | |
25 | + String time = format.format(today); | |
26 | + return time; | |
27 | + } | |
28 | + | |
29 | + /** | |
30 | + * 获取当前分和秒,另外加一个随机数,作为注册邮箱的区分的数字 | |
31 | + * @return | |
32 | + */ | |
33 | + public static String getTime() { | |
34 | + SimpleDateFormat format = new SimpleDateFormat("mmss"); | |
35 | + Date today = new Date(); | |
36 | + String time = format.format(today); | |
37 | + int i = (int)(1+Math.random()*(10-1+1)); | |
38 | + return time+i; | |
39 | + } | |
40 | + | |
41 | +} | ... | ... |
src/test/java/com/essa/pageObject/GoodsManage/AddMarketGoodsPage.java
0 → 100644
... | ... | @@ -0,0 +1,507 @@ |
1 | +package com.essa.pageObject.GoodsManage; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | +import com.essa.framework.Model; | |
10 | +import com.essa.framework.Tools; | |
11 | + | |
12 | +/** | |
13 | + * @author Administrator | |
14 | + *添加市场商品页 | |
15 | + */ | |
16 | +public class AddMarketGoodsPage extends BasePage { | |
17 | + public AddMarketGoodsPage(WebDriver driver) { | |
18 | + super(driver); | |
19 | + } | |
20 | + public static String skuNameNo = null; | |
21 | + /* | |
22 | + * 页面元素定位 | |
23 | + */ | |
24 | + /* | |
25 | + * 元素定位 | |
26 | + */ | |
27 | + //审核人 | |
28 | + @FindBy(xpath="//*[@ng-model='buyerInfo.auditId']") | |
29 | + WebElement auditor; | |
30 | + | |
31 | + //选择供应商 | |
32 | + @FindBy (xpath="//*[@ng-click='supplier()']") | |
33 | + WebElement selectSupplier; | |
34 | + | |
35 | + //供应商查询方式选择 | |
36 | + @FindBy (xpath="//*[@ng-click='showSelect()']") | |
37 | + WebElement showSelect; | |
38 | + | |
39 | + //供应商名称查询 | |
40 | + @FindBy (xpath="//*[contains(@ng-click,'keywordTypeChecked(item)') and @value='name']/..") | |
41 | + WebElement queryByName; | |
42 | + | |
43 | + //查询输入框 | |
44 | + @FindBy (xpath="//*[@ng-keyup='keyupChecked()']") | |
45 | + WebElement queryKeyword; | |
46 | + | |
47 | + //供应商查询按钮 | |
48 | + @FindBy (xpath="//*[@ng-click='search()']") | |
49 | + WebElement search; | |
50 | + | |
51 | + //查询的第一个结果 | |
52 | + @FindBy (xpath="//*[@id='spTableParams']/tbody/tr[1]") | |
53 | + WebElement firstRestult; | |
54 | + | |
55 | + //供应商选择【确定】 | |
56 | + @FindBy (xpath="//*[text()='确定']") | |
57 | + WebElement sureBotton; | |
58 | + | |
59 | + //品牌名称选框 | |
60 | + @FindBy (xpath="//*[text()='品牌名称']/../div[2]/div/div") | |
61 | + WebElement brandName; | |
62 | + | |
63 | + //品牌选项-第一个品牌 | |
64 | + @FindBy (xpath="//*[@class='msgLayer']/li[1]") | |
65 | + WebElement firstBrand; | |
66 | + | |
67 | + //品牌【确定】 | |
68 | + //与供应商选择的确定按钮元素一样,可直接使用 | |
69 | + | |
70 | + //选择类目 | |
71 | + @FindBy(xpath="//*[text()='主类目']/../../div[1]/div") | |
72 | + WebElement selectCategory; | |
73 | + | |
74 | + //玩具类目一级类目 | |
75 | + @FindBy (xpath="//*[@id='undefined_1_switch']") | |
76 | + WebElement oneLevel; | |
77 | + | |
78 | + //动植物二级类目 | |
79 | + @FindBy (xpath="//*[@id='undefined_7_switch']") | |
80 | + WebElement twoLevel; | |
81 | + | |
82 | + //飞行鸟类三级类目 | |
83 | + @FindBy (xpath="//*[text()='飞行鸟类']") | |
84 | + WebElement threeLevel; | |
85 | + | |
86 | + //[主类目]选择 | |
87 | + @FindBy (xpath="//*[contains(@class,'btn btn-success')]") | |
88 | + WebElement mainCategory; | |
89 | + | |
90 | + | |
91 | + /* | |
92 | + * 商品属性 | |
93 | + */ | |
94 | + //商品属性-功能:第二个-遥控 | |
95 | + @FindBy (xpath="//*[text()='功能']/../div[2]/div[2]") | |
96 | + WebElement secondFunction; | |
97 | + | |
98 | + //商品属性-特殊功能:第二个-声控 | |
99 | + @FindBy (xpath="//*[text()='特殊功能']/../div[2]/div[2]") | |
100 | + WebElement secondSpcialFunction; | |
101 | + | |
102 | + //商品属性-外观造型:第一个-仿真 | |
103 | + @FindBy (xpath="//*[text()='外观造型']/../div[2]/div[1]") | |
104 | + WebElement skin; | |
105 | + | |
106 | + //商品属性-是否带人 | |
107 | + @FindBy (xpath="//*[text()='是否带人']/../div[2]/div[1]") | |
108 | + WebElement withPerson; | |
109 | + | |
110 | + //商品属性-适用年龄:第三个-6-18个月 | |
111 | + @FindBy (xpath="//*[text()='适用年龄']/../div[2]/div[3]") | |
112 | + WebElement forAge; | |
113 | + | |
114 | + /* | |
115 | + * 商品信息 | |
116 | + */ | |
117 | + | |
118 | + //品名选择 | |
119 | + @FindBy (xpath="//*[text()='品名']/../div[2]/div") | |
120 | + WebElement selectLanguage; | |
121 | + | |
122 | + //品名语言-英语 | |
123 | + @FindBy (xpath="//*[@class='msg2']/ul[1]/li[2]") | |
124 | + WebElement english; | |
125 | + | |
126 | + //品名输入框 | |
127 | + @FindBy (xpath="//*[text()='品名']/../div[3]/div/input") | |
128 | + WebElement goodsName; | |
129 | + | |
130 | + //工厂货号输入框 | |
131 | + @FindBy (xpath="//*[@ng-model='model.factoryNo']") | |
132 | + WebElement factoryNo; | |
133 | + | |
134 | + //自有版权 | |
135 | + @FindBy (xpath="//*[text()='自有版权']") | |
136 | + WebElement ownCopyright; | |
137 | + | |
138 | + //第三方版权 | |
139 | + @FindBy (xpath="//*[text()='第三方版权']") | |
140 | + WebElement thirdCopyright; | |
141 | + | |
142 | + //无授权 | |
143 | + @FindBy (xpath="//*[text()='无版权']") | |
144 | + WebElement noCopyright; | |
145 | + | |
146 | + //A货 | |
147 | + @FindBy (xpath="//*[text()='A货']") | |
148 | + WebElement AGoods; | |
149 | + | |
150 | + //新品保护期 -第三个:7天 | |
151 | + @FindBy (xpath="//*[@dic-list='新品保护期']/div[3]") | |
152 | + WebElement sevenDays; | |
153 | + | |
154 | + /* | |
155 | + * 商品规格 | |
156 | + */ | |
157 | + | |
158 | + //计量单位-第一个:只 | |
159 | + @FindBy (xpath="//*[@dic-list='计量单位']/div[1]") | |
160 | + WebElement countUnit; | |
161 | + | |
162 | + //外箱 | |
163 | + @FindBy (xpath="//*[text()='外箱']") | |
164 | + WebElement outBox; | |
165 | + | |
166 | + //遥控模式 | |
167 | + @FindBy (xpath="//*[@placeholder='请选择遥控模式']") | |
168 | + WebElement remoteMode; | |
169 | + | |
170 | + //遥控模式:无线电 | |
171 | + @FindBy (xpath="//*[@placeholder='请选择遥控模式']/../../div[3]/div/span[1]") | |
172 | + WebElement remoteMode2; | |
173 | + | |
174 | + //通道 | |
175 | + @FindBy (xpath="//*[@placeholder='请选择通道']") | |
176 | + WebElement thoroughfare; | |
177 | + | |
178 | + //通道:2通 | |
179 | + @FindBy (xpath="//*[@placeholder='请选择通道']/../../div[3]/div/span[1]") | |
180 | + WebElement thoroughfare2; | |
181 | + | |
182 | + //常规功能 | |
183 | + @FindBy (xpath="//*[@placeholder='请选择常规功能']") | |
184 | + WebElement normalFunction; | |
185 | + | |
186 | + //常规功能:灯光 | |
187 | + @FindBy (xpath="//*[@placeholder='请选择常规功能']/../../div[3]/div/span[2]") | |
188 | + WebElement normalFunction2; | |
189 | + | |
190 | + //是否包电 | |
191 | + @FindBy (xpath="//*[@placeholder='请选择是否包电']") | |
192 | + WebElement isBattery; | |
193 | + | |
194 | + //是否包电:包电 | |
195 | + @FindBy (xpath="//*[@placeholder='请选择是否包电']/../../div[3]/div/span[2]") | |
196 | + WebElement isBattery2; | |
197 | + | |
198 | + //是否可充电 | |
199 | + @FindBy (xpath="//*[@placeholder='请选择是否可充电']") | |
200 | + WebElement isCharge; | |
201 | + | |
202 | + //是否可充电:可充电 | |
203 | + @FindBy (xpath="//*[@placeholder='请选择是否可充电']/../../div[3]/div/span[1]") | |
204 | + WebElement isCharge2; | |
205 | + | |
206 | + //配件 | |
207 | + @FindBy (xpath="//*[@placeholder='请选择配件']") | |
208 | + WebElement parts; | |
209 | + | |
210 | + //配件:无 | |
211 | + @FindBy (xpath="//*[@placeholder='请选择配件']/../../div[3]/div/span[1]") | |
212 | + WebElement parts2; | |
213 | + | |
214 | + //包装图案 | |
215 | + @FindBy (xpath="//*[@placeholder='请选择包装图案']") | |
216 | + WebElement pattern; | |
217 | + | |
218 | + //包装图案:无 | |
219 | + @FindBy (xpath="//*[@placeholder='请选择包装图案']/../../div[3]/div/span[1]") | |
220 | + WebElement pattern2; | |
221 | + | |
222 | + //单品或套装 | |
223 | + @FindBy (xpath="//*[@placeholder='请选择单品或套装']") | |
224 | + WebElement suit; | |
225 | + | |
226 | + //单品或套装:单品 | |
227 | + @FindBy (xpath="//*[@placeholder='请选择单品或套装']/../../div[3]/div/span[1]") | |
228 | + WebElement suit2; | |
229 | + | |
230 | + //局部工艺 | |
231 | + @FindBy (xpath="//*[@placeholder='请选择局部工艺']") | |
232 | + WebElement localProcess; | |
233 | + | |
234 | + //局部工艺:无 | |
235 | + @FindBy (xpath="//*[@placeholder='请选择局部工艺']/../../div[3]/div/span[1]") | |
236 | + WebElement localProcess2; | |
237 | + | |
238 | + //颜色 | |
239 | + @FindBy (xpath="//*[@placeholder='请选择颜色']") | |
240 | + WebElement color; | |
241 | + | |
242 | + //颜色 | |
243 | + @FindBy (xpath="//*[@placeholder='请选择颜色']/../../div[3]/div/span[1]") | |
244 | + WebElement color2; | |
245 | + | |
246 | + //装量 | |
247 | + @FindBy (xpath="//*[@placeholder='请选择装量']") | |
248 | + WebElement count; | |
249 | + | |
250 | + //装量:1 | |
251 | + @FindBy (xpath="//*[@placeholder='请选择装量']/../../div[3]/div/span[1]") | |
252 | + WebElement count2; | |
253 | + | |
254 | + //包装类型 | |
255 | + @FindBy (xpath="//*[@placeholder='请选择包装类型']") | |
256 | + WebElement packingType; | |
257 | + | |
258 | + //包装类型:OPP袋 | |
259 | + @FindBy (xpath="//*[@placeholder='请选择包装类型']/../../div[3]/div/span[1]") | |
260 | + WebElement packingType2; | |
261 | + | |
262 | + //包装方式 | |
263 | + @FindBy (xpath="//*[@placeholder='请选择包装方式']") | |
264 | + WebElement packingWay; | |
265 | + | |
266 | + //包装方式:OPP袋 | |
267 | + @FindBy (xpath="//*[@placeholder='请选择包装方式']/../../div[3]/div/span[1]") | |
268 | + WebElement packingWay2; | |
269 | + | |
270 | + //“+”sku按钮 | |
271 | + @FindBy (xpath="//*[@class='addSku']") | |
272 | + WebElement addSku; | |
273 | + | |
274 | + //计数数量 | |
275 | + @FindBy (xpath="//*[@title='计数数量']/div/input") | |
276 | + WebElement skuItemCount; | |
277 | + | |
278 | + //销售MOQ | |
279 | + @FindBy (xpath="//*[@title='销售MOQ']/div/input") | |
280 | + WebElement saleMOQ; | |
281 | + | |
282 | + //供货周期 | |
283 | + @FindBy (xpath="//*[@title='供货周期']/div/input") | |
284 | + WebElement supplyTime; | |
285 | + | |
286 | + //供应商报价 | |
287 | + @FindBy (xpath="//*[@placeholder='单品价格']") | |
288 | + WebElement suppliPrice; | |
289 | + | |
290 | + //横向滚动条1 | |
291 | + @FindBy (xpath="//*[@id='customScroll']") | |
292 | + WebElement widthScroll1; | |
293 | + | |
294 | +// //横向滚动条2,滚动条与内容一起,无法拖动 | |
295 | +// @FindBy (xpath="//*[contains(@id,'table-single-goods-sku')]/..") | |
296 | +// WebElement widthScroll2; | |
297 | + | |
298 | + //外箱体积-长 | |
299 | + @FindBy (xpath="//*[@title='外箱体积(cm)']/div[2]/input") | |
300 | + WebElement packageLong; | |
301 | + | |
302 | + //外箱体积-宽 | |
303 | + @FindBy (xpath="//*[@title='外箱体积(cm)']/div[3]/input") | |
304 | + WebElement packageWidth; | |
305 | + | |
306 | + //外箱体积-高 | |
307 | + @FindBy (xpath="//*[@title='外箱体积(cm)']/div[4]/input") | |
308 | + WebElement packageHigh; | |
309 | + | |
310 | + //毛重 | |
311 | + @FindBy (xpath="//*[@title='毛重']/div/input") | |
312 | + WebElement grossWeight; | |
313 | + | |
314 | + //净重 | |
315 | + @FindBy (xpath="//*[@title='净重']/div/input") | |
316 | + WebElement netWeight; | |
317 | + | |
318 | + //上传图片 | |
319 | + @FindBy (xpath="//*[contains(@handler-obj,'skuPicsHandler')]") | |
320 | + WebElement updatePic; | |
321 | + | |
322 | + //图片上传成功验证 | |
323 | + @FindBy (xpath="//*[contains(@ng-click,'deleteInfo')]") | |
324 | + WebElement isUpudate; | |
325 | + | |
326 | + //提交审核 | |
327 | + @FindBy (xpath="//*[text()='提交审核']") | |
328 | + WebElement submit; | |
329 | + | |
330 | + //提交审核后弹窗--确定按钮 | |
331 | + @FindBy(xpath="//*[text()='确定']") | |
332 | + WebElement confirm; | |
333 | + | |
334 | + //提交审核后弹窗--商品编号 | |
335 | + @FindBy (xpath="//*[@ng-bind='item.no']") | |
336 | + WebElement skuNo; | |
337 | + | |
338 | + /* | |
339 | + * 页面方法 | |
340 | + */ | |
341 | + /** | |
342 | + * 选择供应商 | |
343 | + * @param 供应商名称 | |
344 | + * @throws InterruptedException | |
345 | + */ | |
346 | + public void selectSupplier(){ | |
347 | +// forceWait(2000); | |
348 | +//// isThisPage("选择...", selectSupplier); | |
349 | + dynamicWait(By.xpath("//*[@ng-click='supplier()']")); | |
350 | +// mywait(selectSupplier); | |
351 | + selectElement(auditor, "邢昌勇"); | |
352 | + click(selectSupplier); | |
353 | + click(showSelect); | |
354 | + click(queryByName); | |
355 | + sendKeys(queryKeyword,Model.getSupplierName()); | |
356 | + click(search); | |
357 | + forceWait(1000); | |
358 | + mywait(firstRestult); | |
359 | + click(firstRestult); | |
360 | + click(sureBotton); | |
361 | + } | |
362 | + /** | |
363 | + * 选择品牌 | |
364 | + */ | |
365 | + public void selectBrand() { | |
366 | + forceWait(1000); | |
367 | + click(brandName); | |
368 | + mywait(firstBrand); | |
369 | + click(firstBrand); | |
370 | + click(sureBotton); | |
371 | + } | |
372 | + /** | |
373 | + * 选择主类目 | |
374 | + * 注意:这里只能用js点击事件才能展开那个“+” | |
375 | + * @throws InterruptedException | |
376 | + */ | |
377 | + public void selectCategory(){ | |
378 | + forceWait(1000); | |
379 | + mywait(selectCategory); | |
380 | + click(selectCategory); | |
381 | + jsExecutorClick(oneLevel); | |
382 | + jsExecutorClick(twoLevel); | |
383 | + jsExecutorClick(threeLevel); | |
384 | + jsExecutorClick(mainCategory); | |
385 | + click(sureBotton); | |
386 | + } | |
387 | + /** | |
388 | + * 配置商品属性 | |
389 | + */ | |
390 | + public void goodsProperty() { | |
391 | + mywait(secondFunction); | |
392 | + click(secondFunction); | |
393 | + click(secondSpcialFunction); | |
394 | + click(skin); | |
395 | + click(withPerson); | |
396 | + click(forAge); | |
397 | + } | |
398 | + /** | |
399 | + * 配置商品信息 | |
400 | + */ | |
401 | + public void goodsInfo() { | |
402 | + skuNameNo = Tools.getCurrentTime(); | |
403 | + //挪动滚动条,否则查找不到元素 | |
404 | + moveHeightScroll("40"); | |
405 | + sendKeys(goodsName, "市场"+skuNameNo); | |
406 | + click(selectLanguage); | |
407 | + click(english); | |
408 | + sendKeys(goodsName, "Market"+skuNameNo); | |
409 | + sendKeys(factoryNo, Tools.getFactoryNo()); | |
410 | + click(ownCopyright); | |
411 | + click(sevenDays); | |
412 | + } | |
413 | + /** | |
414 | + * 选择sku属性,并提交 | |
415 | + * @return 商品发布页 | |
416 | + */ | |
417 | + public void goodsSpecifications() { | |
418 | + moveHeightScroll("65"); | |
419 | + click(countUnit); | |
420 | + click(outBox); | |
421 | + click(remoteMode); | |
422 | + click(remoteMode2); | |
423 | + click(thoroughfare); | |
424 | + click(thoroughfare2); | |
425 | + click(normalFunction); | |
426 | + click(normalFunction2); | |
427 | + click(isBattery); | |
428 | + click(isBattery2); | |
429 | + click(isCharge); | |
430 | + click(isCharge2); | |
431 | + click(parts); | |
432 | + click(parts2); | |
433 | + click(pattern); | |
434 | + click(pattern2); | |
435 | + click(suit); | |
436 | + click(suit2); | |
437 | + click(localProcess); | |
438 | + click(localProcess2); | |
439 | + click(color); | |
440 | + click(color2); | |
441 | + click(count); | |
442 | + click(count2); | |
443 | + click(packingType); | |
444 | + click(packingType2); | |
445 | + click(packingWay); | |
446 | + click(packingWay2); | |
447 | + click(addSku); | |
448 | + | |
449 | + sendKeys(skuItemCount, "10"); | |
450 | + sendKeys(saleMOQ, "10"); | |
451 | + sendKeys(supplyTime, "3"); | |
452 | + | |
453 | + //供应商报价,随机生成一个1-200的价格 | |
454 | + int sp = (int)(1+Math.random()*200); | |
455 | + sendKeys(suppliPrice, sp+""); | |
456 | + | |
457 | + jsExecutorDragAndDrop(widthScroll1,2000,0); | |
458 | + mywait(packageLong); | |
459 | + | |
460 | + //外箱体积 | |
461 | + sendKeys(packageLong, "100"); | |
462 | + sendKeys(packageWidth, "50"); | |
463 | + sendKeys(packageHigh, "40"); | |
464 | + //毛重,净重 | |
465 | + sendKeys(grossWeight, "1.5"); | |
466 | + sendKeys(netWeight, "1.2"); | |
467 | + } | |
468 | + | |
469 | + /** | |
470 | + * 上传sku图片并提交审核,确认弹框 | |
471 | + */ | |
472 | + public void updatePic() { | |
473 | + click(updatePic); | |
474 | + uploadFile(Model.getPicPath()); | |
475 | + while(!isElementExist(isUpudate)) { | |
476 | + forceWait(1000); | |
477 | + } | |
478 | + forceWait(1000); | |
479 | + click(submit); | |
480 | + forceWait(1000); | |
481 | + mywait(confirm); | |
482 | + setSkuNo(); | |
483 | + click(confirm); | |
484 | + } | |
485 | + | |
486 | + /** | |
487 | + * 市场商品建档,将上面的方法整合 | |
488 | + * @return MarketGoodsRelesePage | |
489 | + */ | |
490 | + public MarketGoodsRelesePage addMarketGoods() { | |
491 | + selectSupplier(); | |
492 | + selectBrand(); | |
493 | + selectCategory(); | |
494 | + goodsProperty(); | |
495 | + goodsInfo(); | |
496 | + goodsSpecifications(); | |
497 | + updatePic(); | |
498 | + return new MarketGoodsRelesePage(driver); | |
499 | + } | |
500 | + | |
501 | + /** | |
502 | + * 将商品编号写进model | |
503 | + */ | |
504 | + public void setSkuNo() { | |
505 | + Model.setSkuNo(skuNo.getText()); | |
506 | + } | |
507 | +} | ... | ... |
src/test/java/com/essa/pageObject/GoodsManage/AddOriginalGoodsPage.java
0 → 100644
... | ... | @@ -0,0 +1,505 @@ |
1 | +package com.essa.pageObject.GoodsManage; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | +import com.essa.framework.Tools; | |
10 | + | |
11 | +import bsh.This; | |
12 | + | |
13 | +/** | |
14 | + * 新增原厂商品页面 | |
15 | + * @author Administrator | |
16 | + * | |
17 | + */ | |
18 | +public class AddOriginalGoodsPage extends BasePage { | |
19 | + public AddOriginalGoodsPage(WebDriver driver) { | |
20 | + super(driver); | |
21 | + } | |
22 | + | |
23 | + public static String skuNameNo = null; | |
24 | + public static String supplierName ; | |
25 | + | |
26 | + /* | |
27 | + * 元素定位 | |
28 | + */ | |
29 | + | |
30 | + //选择供应商 | |
31 | + @FindBy (xpath="//*[@ng-click='supplier()']") | |
32 | + WebElement selectSupplier; | |
33 | + | |
34 | + //供应商查询方式选择 | |
35 | + @FindBy (xpath="//*[@ng-click='showSelect()']") | |
36 | + WebElement showSelect; | |
37 | + | |
38 | + //供应商名称查询 | |
39 | + @FindBy (xpath="//*[contains(@ng-click,'keywordTypeChecked(item)') and @value='name']/..") | |
40 | +// @FindBy (xpath="//*[@ng-click='showSelect()']/../ul[1]") | |
41 | + WebElement queryByName; | |
42 | + | |
43 | + //查询输入框 | |
44 | + @FindBy (xpath="//*[@ng-keyup='keyupChecked()']") | |
45 | + WebElement queryKeyword; | |
46 | + | |
47 | + //供应商查询按钮 | |
48 | + @FindBy (xpath="//*[@ng-click='search()']") | |
49 | + WebElement search; | |
50 | + | |
51 | + //查询的第一个结果 | |
52 | + @FindBy (xpath="//*[@id='spTableParams']/tbody/tr[1]") | |
53 | + WebElement firstRestult; | |
54 | + | |
55 | + //供应商选择【确定】 | |
56 | + @FindBy (xpath="//*[text()='确定']") | |
57 | + WebElement sureBotton; | |
58 | + | |
59 | + //品牌名称选框 | |
60 | + @FindBy (xpath="//*[text()='品牌名称']/../div[2]/div/div") | |
61 | + WebElement brandName; | |
62 | + | |
63 | + //品牌选项-第一个品牌 | |
64 | + @FindBy (xpath="//*[@class='msgLayer']/li[1]") | |
65 | + WebElement firstBrand; | |
66 | + | |
67 | + //品牌【确定】 | |
68 | + //与供应商选择的确定按钮元素一样,可直接使用 | |
69 | + | |
70 | + //选择类目 | |
71 | + @FindBy(xpath="//*[text()='主类目']/../../div[1]/div") | |
72 | + WebElement selectCategory; | |
73 | + | |
74 | + //玩具类目一级类目 | |
75 | + @FindBy (xpath="//*[@id='undefined_1_switch']") | |
76 | + WebElement oneLevel; | |
77 | + | |
78 | + //动植物二级类目 | |
79 | + @FindBy (xpath="//*[@id='undefined_7_switch']") | |
80 | + WebElement twoLevel; | |
81 | + | |
82 | + //飞行鸟类三级类目 | |
83 | + @FindBy (xpath="//*[text()='飞行鸟类']") | |
84 | + WebElement threeLevel; | |
85 | + | |
86 | + //[主类目]选择 | |
87 | + @FindBy (xpath="//*[contains(@class,'btn btn-success')]") | |
88 | + WebElement mainCategory; | |
89 | + | |
90 | + | |
91 | + /* | |
92 | + * 商品属性 | |
93 | + */ | |
94 | + //商品属性-功能:第二个-遥控 | |
95 | + @FindBy (xpath="//*[text()='功能']/../div[2]/div[2]") | |
96 | + WebElement secondFunction; | |
97 | + | |
98 | + //商品属性-特殊功能:第二个-声控 | |
99 | + @FindBy (xpath="//*[text()='特殊功能']/../div[2]/div[2]") | |
100 | + WebElement secondSpcialFunction; | |
101 | + | |
102 | + //商品属性-外观造型:第一个-仿真 | |
103 | + @FindBy (xpath="//*[text()='外观造型']/../div[2]/div[1]") | |
104 | + WebElement skin; | |
105 | + | |
106 | + //商品属性-是否带人 | |
107 | + @FindBy (xpath="//*[text()='是否带人']/../div[2]/div[1]") | |
108 | + WebElement withPerson; | |
109 | + | |
110 | + //商品属性-适用年龄:第三个-6-18个月 | |
111 | + @FindBy (xpath="//*[text()='适用年龄']/../div[2]/div[3]") | |
112 | + WebElement forAge; | |
113 | + | |
114 | + /* | |
115 | + * 商品信息 | |
116 | + */ | |
117 | + | |
118 | + //品名选择 | |
119 | + @FindBy (xpath="//*[text()='品名']/../div[2]/div") | |
120 | + WebElement selectLanguage; | |
121 | + | |
122 | + //品名语言-英语 | |
123 | + @FindBy (xpath="//*[@class='msg2']/ul[1]/li[2]") | |
124 | + WebElement english; | |
125 | + | |
126 | + //品名输入框 | |
127 | + @FindBy (xpath="//*[text()='品名']/../div[3]/div/input") | |
128 | + WebElement goodsName; | |
129 | + | |
130 | + //工厂货号输入框 | |
131 | + @FindBy (xpath="//*[@ng-model='model.factoryNo']") | |
132 | + WebElement factoryNo; | |
133 | + | |
134 | + //自有版权 | |
135 | + @FindBy (xpath="//*[text()='自有版权']") | |
136 | + WebElement ownCopyright; | |
137 | + | |
138 | + //第三方版权 | |
139 | + @FindBy (xpath="//*[text()='第三方版权']") | |
140 | + WebElement thirdCopyright; | |
141 | + | |
142 | + //无授权 | |
143 | + @FindBy (xpath="//*[text()='无版权']") | |
144 | + WebElement noCopyright; | |
145 | + | |
146 | + //A货 | |
147 | + @FindBy (xpath="//*[text()='A货']") | |
148 | + WebElement AGoods; | |
149 | + | |
150 | + //新品保护期 -第三个:7天 | |
151 | + @FindBy (xpath="//*[@dic-list='新品保护期']/div[3]") | |
152 | + WebElement sevenDays; | |
153 | + | |
154 | + /* | |
155 | + * 商品规格 | |
156 | + */ | |
157 | + | |
158 | + //计量单位-第一个:只 | |
159 | + @FindBy (xpath="//*[@dic-list='计量单位']/div[1]") | |
160 | + WebElement countUnit; | |
161 | + | |
162 | + //外箱 | |
163 | + @FindBy (xpath="//*[text()='外箱']") | |
164 | + WebElement outBox; | |
165 | + | |
166 | + //遥控模式 | |
167 | + @FindBy (xpath="//*[@placeholder='请选择遥控模式']") | |
168 | + WebElement remoteMode; | |
169 | + | |
170 | + //遥控模式:无线电 | |
171 | + @FindBy (xpath="//*[@placeholder='请选择遥控模式']/../../div[3]/div/span[1]") | |
172 | + WebElement remoteMode2; | |
173 | + | |
174 | + //通道 | |
175 | + @FindBy (xpath="//*[@placeholder='请选择通道']") | |
176 | + WebElement thoroughfare; | |
177 | + | |
178 | + //通道:2通 | |
179 | + @FindBy (xpath="//*[@placeholder='请选择通道']/../../div[3]/div/span[1]") | |
180 | + WebElement thoroughfare2; | |
181 | + | |
182 | + //常规功能 | |
183 | + @FindBy (xpath="//*[@placeholder='请选择常规功能']") | |
184 | + WebElement normalFunction; | |
185 | + | |
186 | + //常规功能:灯光 | |
187 | + @FindBy (xpath="//*[@placeholder='请选择常规功能']/../../div[3]/div/span[2]") | |
188 | + WebElement normalFunction2; | |
189 | + | |
190 | + //是否包电 | |
191 | + @FindBy (xpath="//*[@placeholder='请选择是否包电']") | |
192 | + WebElement isBattery; | |
193 | + | |
194 | + //是否包电:包电 | |
195 | + @FindBy (xpath="//*[@placeholder='请选择是否包电']/../../div[3]/div/span[2]") | |
196 | + WebElement isBattery2; | |
197 | + | |
198 | + //是否可充电 | |
199 | + @FindBy (xpath="//*[@placeholder='请选择是否可充电']") | |
200 | + WebElement isCharge; | |
201 | + | |
202 | + //是否可充电:可充电 | |
203 | + @FindBy (xpath="//*[@placeholder='请选择是否可充电']/../../div[3]/div/span[1]") | |
204 | + WebElement isCharge2; | |
205 | + | |
206 | + //配件 | |
207 | + @FindBy (xpath="//*[@placeholder='请选择配件']") | |
208 | + WebElement parts; | |
209 | + | |
210 | + //配件:无 | |
211 | + @FindBy (xpath="//*[@placeholder='请选择配件']/../../div[3]/div/span[1]") | |
212 | + WebElement parts2; | |
213 | + | |
214 | + //包装图案 | |
215 | + @FindBy (xpath="//*[@placeholder='请选择包装图案']") | |
216 | + WebElement pattern; | |
217 | + | |
218 | + //包装图案:无 | |
219 | + @FindBy (xpath="//*[@placeholder='请选择包装图案']/../../div[3]/div/span[1]") | |
220 | + WebElement pattern2; | |
221 | + | |
222 | + //单品或套装 | |
223 | + @FindBy (xpath="//*[@placeholder='请选择单品或套装']") | |
224 | + WebElement suit; | |
225 | + | |
226 | + //单品或套装:单品 | |
227 | + @FindBy (xpath="//*[@placeholder='请选择单品或套装']/../../div[3]/div/span[1]") | |
228 | + WebElement suit2; | |
229 | + | |
230 | + //局部工艺 | |
231 | + @FindBy (xpath="//*[@placeholder='请选择局部工艺']") | |
232 | + WebElement localProcess; | |
233 | + | |
234 | + //局部工艺:无 | |
235 | + @FindBy (xpath="//*[@placeholder='请选择局部工艺']/../../div[3]/div/span[1]") | |
236 | + WebElement localProcess2; | |
237 | + | |
238 | + //颜色 | |
239 | + @FindBy (xpath="//*[@placeholder='请选择颜色']") | |
240 | + WebElement color; | |
241 | + | |
242 | + //颜色 | |
243 | + @FindBy (xpath="//*[@placeholder='请选择颜色']/../../div[3]/div/span[1]") | |
244 | + WebElement color2; | |
245 | + | |
246 | + //装量 | |
247 | + @FindBy (xpath="//*[@placeholder='请选择装量']") | |
248 | + WebElement count; | |
249 | + | |
250 | + //装量:1 | |
251 | + @FindBy (xpath="//*[@placeholder='请选择装量']/../../div[3]/div/span[1]") | |
252 | + WebElement count2; | |
253 | + | |
254 | + //包装类型 | |
255 | + @FindBy (xpath="//*[@placeholder='请选择包装类型']") | |
256 | + WebElement packingType; | |
257 | + | |
258 | + //包装类型:OPP袋 | |
259 | + @FindBy (xpath="//*[@placeholder='请选择包装类型']/../../div[3]/div/span[1]") | |
260 | + WebElement packingType2; | |
261 | + | |
262 | + //包装方式 | |
263 | + @FindBy (xpath="//*[@placeholder='请选择包装方式']") | |
264 | + WebElement packingWay; | |
265 | + | |
266 | + //包装方式:OPP袋 | |
267 | + @FindBy (xpath="//*[@placeholder='请选择包装方式']/../../div[3]/div/span[1]") | |
268 | + WebElement packingWay2; | |
269 | + | |
270 | + //“+”sku按钮 | |
271 | + @FindBy (xpath="//*[@class='addSku']") | |
272 | + WebElement addSku; | |
273 | + | |
274 | + //计数数量 | |
275 | + @FindBy (xpath="//*[@title='计数数量']/div/input") | |
276 | + WebElement skuItemCount; | |
277 | + | |
278 | + //销售MOQ | |
279 | + @FindBy (xpath="//*[@title='销售MOQ']/div/input") | |
280 | + WebElement saleMOQ; | |
281 | + | |
282 | + //供货周期 | |
283 | + @FindBy (xpath="//*[@title='供货周期']/div/input") | |
284 | + WebElement supplyTime; | |
285 | + | |
286 | + //供应商报价 | |
287 | + @FindBy (xpath="//*[@placeholder='单品价格']") | |
288 | + WebElement suppliPrice; | |
289 | + | |
290 | + //横向滚动条1 | |
291 | + @FindBy (xpath="//*[@id='customScroll']") | |
292 | + WebElement widthScroll1; | |
293 | + | |
294 | +// //横向滚动条2,滚动条与内容一起,无法拖动 | |
295 | +// @FindBy (xpath="//*[contains(@id,'table-single-goods-sku')]/..") | |
296 | +// WebElement widthScroll2; | |
297 | + | |
298 | + //外箱体积-长 | |
299 | + @FindBy (xpath="//*[@title='外箱体积(cm)']/div[2]/input") | |
300 | + WebElement packageLong; | |
301 | + | |
302 | + //外箱体积-宽 | |
303 | + @FindBy (xpath="//*[@title='外箱体积(cm)']/div[3]/input") | |
304 | + WebElement packageWidth; | |
305 | + | |
306 | + //外箱体积-高 | |
307 | + @FindBy (xpath="//*[@title='外箱体积(cm)']/div[4]/input") | |
308 | + WebElement packageHigh; | |
309 | + | |
310 | + //毛重 | |
311 | + @FindBy (xpath="//*[@title='毛重']/div/input") | |
312 | + WebElement grossWeight; | |
313 | + | |
314 | + //净重 | |
315 | + @FindBy (xpath="//*[@title='净重']/div/input") | |
316 | + WebElement netWeight; | |
317 | + | |
318 | + //保存 | |
319 | + @FindBy (xpath="//*[text()='保存']") | |
320 | + WebElement save; | |
321 | + | |
322 | + //提示 | |
323 | + @FindBy(xpath="//*[text()='原厂商品保存成功']") | |
324 | + WebElement succeedMessage; | |
325 | + | |
326 | + /* | |
327 | + * 以下为页面方法 | |
328 | + */ | |
329 | + | |
330 | + /** | |
331 | + * 选择供应商 | |
332 | + * @param 供应商名称 | |
333 | + * @throws InterruptedException | |
334 | + */ | |
335 | + public void selectSupplier(String supplierName){ | |
336 | + forceWait(2000); | |
337 | +// isThisPage("选择...", selectSupplier); | |
338 | + dynamicWait(By.xpath("//*[@ng-click='supplier()']")); | |
339 | + click(selectSupplier); | |
340 | + click(showSelect); | |
341 | + click(queryByName); | |
342 | + sendKeys(queryKeyword,supplierName); | |
343 | + click(search); | |
344 | + forceWait(1000); | |
345 | +// mywait(firstRestult); | |
346 | + dynamicWait(By.xpath("//*[@id='spTableParams']/tbody/tr[1]")); | |
347 | + click(firstRestult); | |
348 | + click(sureBotton); | |
349 | + } | |
350 | + | |
351 | + /** | |
352 | + * 选择品牌 | |
353 | + */ | |
354 | + public void selectBrand() { | |
355 | + forceWait(1000); | |
356 | + click(brandName); | |
357 | +// mywait(firstBrand); | |
358 | + dynamicWait(By.xpath("//*[@class='msgLayer']/li[1]")); | |
359 | + click(firstBrand); | |
360 | + click(sureBotton); | |
361 | + } | |
362 | + | |
363 | + /** | |
364 | + * 选择主类目 | |
365 | + * 注意:这里只能用js点击事件才能展开那个“+” | |
366 | + * @throws InterruptedException | |
367 | + */ | |
368 | + public void selectCategory(){ | |
369 | + forceWait(1000); | |
370 | + mywait(selectCategory); | |
371 | + click(selectCategory); | |
372 | + jsExecutorClick(oneLevel); | |
373 | + jsExecutorClick(twoLevel); | |
374 | + jsExecutorClick(threeLevel); | |
375 | + jsExecutorClick(mainCategory); | |
376 | + click(sureBotton); | |
377 | + } | |
378 | + | |
379 | + /** | |
380 | + * 配置商品属性 | |
381 | + */ | |
382 | + public void goodsProperty() { | |
383 | + mywait(secondFunction); | |
384 | + click(secondFunction); | |
385 | + click(secondSpcialFunction); | |
386 | + click(skin); | |
387 | + click(withPerson); | |
388 | + click(forAge); | |
389 | + } | |
390 | + | |
391 | + /** | |
392 | + * 配置商品信息 | |
393 | + */ | |
394 | + public void goodsInfo() { | |
395 | + skuNameNo = Tools.getCurrentTime(); | |
396 | + //挪动滚动条,否则查找不到元素 | |
397 | + moveHeightScroll("40"); | |
398 | + sendKeys(goodsName, "原厂"+skuNameNo); | |
399 | + click(selectLanguage); | |
400 | + click(english); | |
401 | + sendKeys(goodsName, "Original"+skuNameNo); | |
402 | + sendKeys(factoryNo, Tools.getFactoryNo()); | |
403 | + click(ownCopyright); | |
404 | + click(sevenDays); | |
405 | + } | |
406 | + | |
407 | + /** | |
408 | + * 选择sku属性,并提交 | |
409 | + * @return 商品发布页 | |
410 | + */ | |
411 | + public GoodsRelesePage goodsSpecifications() { | |
412 | + moveHeightScroll("65"); | |
413 | + click(countUnit); | |
414 | + click(outBox); | |
415 | + click(remoteMode); | |
416 | + click(remoteMode2); | |
417 | + click(thoroughfare); | |
418 | + click(thoroughfare2); | |
419 | + click(normalFunction); | |
420 | + click(normalFunction2); | |
421 | + click(isBattery); | |
422 | + click(isBattery2); | |
423 | + click(isCharge); | |
424 | + click(isCharge2); | |
425 | + click(parts); | |
426 | + click(parts2); | |
427 | + click(pattern); | |
428 | + click(pattern2); | |
429 | + click(suit); | |
430 | + click(suit2); | |
431 | + click(localProcess); | |
432 | + click(localProcess2); | |
433 | + click(color); | |
434 | + click(color2); | |
435 | + click(count); | |
436 | + click(count2); | |
437 | + click(packingType); | |
438 | + click(packingType2); | |
439 | + click(packingWay); | |
440 | + click(packingWay2); | |
441 | + click(addSku); | |
442 | + | |
443 | + sendKeys(skuItemCount, "10"); | |
444 | + sendKeys(saleMOQ, "10"); | |
445 | + sendKeys(supplyTime, "3"); | |
446 | + | |
447 | + //供应商报价,随机生成一个1-200的价格 | |
448 | + int sp = (int)(1+Math.random()*200); | |
449 | + sendKeys(suppliPrice, sp+""); | |
450 | + | |
451 | + jsExecutorDragAndDrop(widthScroll1,2000,0); | |
452 | + mywait(packageLong); | |
453 | + | |
454 | + //外箱体积 | |
455 | + sendKeys(packageLong, "100"); | |
456 | + sendKeys(packageWidth, "50"); | |
457 | + sendKeys(packageHigh, "40"); | |
458 | + //毛重,净重 | |
459 | + sendKeys(grossWeight, "1.5"); | |
460 | + sendKeys(netWeight, "1.2"); | |
461 | + | |
462 | + click(save); | |
463 | + return new GoodsRelesePage(driver); | |
464 | + } | |
465 | + | |
466 | + /** | |
467 | + * 原厂商品建档,将上面的方法整合 | |
468 | + * @param supplierName | |
469 | + * @return | |
470 | + * @throws InterruptedException | |
471 | + */ | |
472 | + public GoodsRelesePage addOriginalGoods() { | |
473 | + selectSupplier(supplierName); | |
474 | + selectBrand(); | |
475 | + selectCategory(); | |
476 | + goodsProperty(); | |
477 | + goodsInfo(); | |
478 | + goodsSpecifications(); | |
479 | + return new GoodsRelesePage(driver); | |
480 | + } | |
481 | + | |
482 | + /** | |
483 | + * 用于断言是否商品建档成功 | |
484 | + * @return boolean | |
485 | + */ | |
486 | + public boolean isSucceed() { | |
487 | + return isElementExist(succeedMessage); | |
488 | + } | |
489 | + | |
490 | + /** | |
491 | + * 返回商品名称后面的那串数字 | |
492 | + * @return | |
493 | + */ | |
494 | + public static String getSkuNameNo() { | |
495 | + return skuNameNo; | |
496 | + } | |
497 | + | |
498 | + /** | |
499 | + * 通过GUI设置供应商名称 | |
500 | + * @param suppliername | |
501 | + */ | |
502 | + public static void setSupplierName(String suppliername) { | |
503 | + supplierName = suppliername; | |
504 | + } | |
505 | +} | ... | ... |
src/test/java/com/essa/pageObject/GoodsManage/AuditMarketGoodsPage.java
0 → 100644
... | ... | @@ -0,0 +1,70 @@ |
1 | +package com.essa.pageObject.GoodsManage; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | +import com.essa.framework.Model; | |
10 | + | |
11 | +/** | |
12 | + * @author Administrator | |
13 | + *审核市场商品列表页 | |
14 | + */ | |
15 | +public class AuditMarketGoodsPage extends BasePage { | |
16 | + public AuditMarketGoodsPage(WebDriver driver) { | |
17 | + super(driver); | |
18 | + } | |
19 | + /* | |
20 | + * 元素定位 | |
21 | + */ | |
22 | + | |
23 | + /*搜索控件*/ | |
24 | + //采购商编号 | |
25 | + @FindBy (xpath="//*[@placeholder='请输入采购商编号']") | |
26 | + WebElement buyerNo; | |
27 | + | |
28 | + //sku编号 | |
29 | + @FindBy (xpath="//*[contains(@placeholder,'请输入多个商品编号')]") | |
30 | + WebElement skuNo; | |
31 | + | |
32 | + //查询 | |
33 | + @FindBy (xpath="//*[text()='查询']") | |
34 | + WebElement search; | |
35 | + | |
36 | + //搜索结果-第一个复选框 | |
37 | + @FindBy (xpath="//*[@ng-table='tableParams']/tbody[1]/tr[1]/td[1]/input") | |
38 | + WebElement firstCheckBox; | |
39 | + | |
40 | + //审核按钮 | |
41 | + @FindBy (xpath="//*[text()='审核']") | |
42 | + WebElement audit; | |
43 | + | |
44 | + /* | |
45 | + * 页面方法 | |
46 | + */ | |
47 | + /** | |
48 | + * 选择要审核的商品,并点击审核按钮 | |
49 | + * @return AuditMarketOpreatePage | |
50 | + */ | |
51 | + public AuditMarketOpreatePage auditMarketGoods() { | |
52 | + forceWait(500); | |
53 | + sendKeys(skuNo, Model.getSkuNo()); | |
54 | + click(search); | |
55 | + forceWait(1000); | |
56 | + mywait(firstCheckBox); | |
57 | + click(firstCheckBox); | |
58 | + click(audit); | |
59 | + return new AuditMarketOpreatePage(driver); | |
60 | + } | |
61 | + | |
62 | + /** | |
63 | + * 如果审核成功,返回false,列表中已经不存在该待审核sku | |
64 | + * @return boolean | |
65 | + */ | |
66 | + public boolean isSucceed() { | |
67 | + forceWait(1500); | |
68 | + return isVisibility(By.xpath("//*[contains(text(),'"+Model.getSkuNo()+"')]")); | |
69 | + } | |
70 | +} | ... | ... |
src/test/java/com/essa/pageObject/GoodsManage/AuditMarketOpreatePage.java
0 → 100644
... | ... | @@ -0,0 +1,34 @@ |
1 | +package com.essa.pageObject.GoodsManage; | |
2 | + | |
3 | +import org.openqa.selenium.WebDriver; | |
4 | +import org.openqa.selenium.WebElement; | |
5 | +import org.openqa.selenium.support.FindBy; | |
6 | + | |
7 | +import com.essa.framework.BasePage; | |
8 | + | |
9 | +/** | |
10 | + * @author Administrator | |
11 | + *审核市场商品操作页,点击审核的那个页面 | |
12 | + */ | |
13 | +public class AuditMarketOpreatePage extends BasePage { | |
14 | + public AuditMarketOpreatePage(WebDriver driver) { | |
15 | + super(driver); | |
16 | + } | |
17 | + /*元素定位*/ | |
18 | + | |
19 | + //审核通过 | |
20 | + @FindBy(xpath="//*[text()='审核通过']") | |
21 | + WebElement pass; | |
22 | + | |
23 | + /*页面方法*/ | |
24 | + /** | |
25 | + * 审核通过 | |
26 | + * @return | |
27 | + */ | |
28 | + public AuditMarketGoodsPage auditPass() { | |
29 | + forceWait(2000); | |
30 | + moveHeightScroll("100"); | |
31 | + click(pass); | |
32 | + return new AuditMarketGoodsPage(driver); | |
33 | + } | |
34 | +} | ... | ... |
src/test/java/com/essa/pageObject/GoodsManage/AuditOriginalGoodsPage.java
0 → 100644
... | ... | @@ -0,0 +1,74 @@ |
1 | +package com.essa.pageObject.GoodsManage; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | + | |
10 | +/** | |
11 | + * @author Administrator | |
12 | + *审核原厂商品列表页 | |
13 | + */ | |
14 | +public class AuditOriginalGoodsPage extends BasePage { | |
15 | + public AuditOriginalGoodsPage(WebDriver driver) { | |
16 | + super(driver); | |
17 | + } | |
18 | + | |
19 | + /* | |
20 | + * 元素定位 | |
21 | + */ | |
22 | + | |
23 | + //第一个复选框,同时也是检查点 | |
24 | + @FindBy(xpath="//*[@ng-table='tableParams']/tbody[1]/tr[1]/td[1]/input") | |
25 | + WebElement checkBox; | |
26 | + | |
27 | + /** | |
28 | + * 根据商品名称获得其复选框 | |
29 | + * @return WebElement | |
30 | + */ | |
31 | + private WebElement getCheckBox() { | |
32 | + String no = AddOriginalGoodsPage.getSkuNameNo(); | |
33 | + return driver.findElement(By.xpath("//*[contains(@class,'col-sm-') and contains(text(),'"+no+"')]/../../../../td[1]/input")); | |
34 | + } | |
35 | + | |
36 | + //审核 | |
37 | + @FindBy(xpath="//*[text()='审核']") | |
38 | + WebElement audit; | |
39 | + | |
40 | + //批量通过并上架 | |
41 | + @FindBy(xpath="//*[text()='批量通过并上架']") | |
42 | + WebElement batchAudit; | |
43 | + | |
44 | + /* | |
45 | + * 页面方法 | |
46 | + */ | |
47 | + | |
48 | + /** | |
49 | + * 选择商品,并进入审核页面 | |
50 | + * @return AuditOriginalOpreatePage | |
51 | + */ | |
52 | + public AuditOriginalOpreatePage toAuditOriginalSku() { | |
53 | +// forceWait(2000); | |
54 | +// mywait(checkBox); | |
55 | + dynamicWait(By.xpath("//*[@ng-table='tableParams']/tbody[1]/tr[1]/td[1]/input")); | |
56 | + click(getCheckBox()); | |
57 | + click(audit); | |
58 | + return new AuditOriginalOpreatePage(driver); | |
59 | + } | |
60 | + | |
61 | + /** | |
62 | + * 用于断言列表是否有要找的商品 | |
63 | + * @return boolean | |
64 | + */ | |
65 | + public boolean isSucceed() { | |
66 | +// mywait(checkBox); | |
67 | +// forceWait(2000); | |
68 | + dynamicWait(By.xpath("//*[@ng-table='tableParams']/tbody[1]/tr[1]/td[1]/input")); | |
69 | + String SkuNameNo = AddOriginalGoodsPage.getSkuNameNo(); | |
70 | + boolean b = isVisibility(By.xpath("//*[contains(text(),'"+SkuNameNo+"')]")); | |
71 | + return b; | |
72 | + } | |
73 | + | |
74 | +} | ... | ... |
src/test/java/com/essa/pageObject/GoodsManage/AuditOriginalOpreatePage.java
0 → 100644
... | ... | @@ -0,0 +1,52 @@ |
1 | +package com.essa.pageObject.GoodsManage; | |
2 | + | |
3 | +import org.openqa.selenium.WebDriver; | |
4 | +import org.openqa.selenium.WebElement; | |
5 | +import org.openqa.selenium.support.FindBy; | |
6 | + | |
7 | +import com.essa.framework.BasePage; | |
8 | + | |
9 | +/** | |
10 | + * @author Administrator | |
11 | + *审核原厂商品页面 | |
12 | + */ | |
13 | +public class AuditOriginalOpreatePage extends BasePage { | |
14 | + public AuditOriginalOpreatePage(WebDriver driver) { | |
15 | + super(driver); | |
16 | + } | |
17 | + /* | |
18 | + * 元素定位 | |
19 | + */ | |
20 | + | |
21 | + //审核通过 | |
22 | + @FindBy(xpath="//*[text()='审核通过']") | |
23 | + WebElement pass; | |
24 | + | |
25 | + //审核通过提示语 | |
26 | + @FindBy(xpath="//*[text()='商品审核已通过'") | |
27 | + WebElement succeedMessage; | |
28 | + | |
29 | + /* | |
30 | + * 页面方法 | |
31 | + */ | |
32 | + | |
33 | + /** | |
34 | + * 挪动滚动条至底部,点击审核通过 | |
35 | + * @return AuditOriginalGoodsPage | |
36 | + */ | |
37 | + public AuditOriginalGoodsPage auditPass() { | |
38 | + forceWait(2000); | |
39 | + moveHeightScroll("100"); | |
40 | + click(pass); | |
41 | + return new AuditOriginalGoodsPage(driver); | |
42 | + } | |
43 | + | |
44 | + /** | |
45 | + * 用于断言商品审核是否通过 | |
46 | + * @return boolean | |
47 | + */ | |
48 | + public boolean isSucceed() { | |
49 | + return isElementExist(succeedMessage); | |
50 | + } | |
51 | + | |
52 | +} | ... | ... |
src/test/java/com/essa/pageObject/GoodsManage/EditSpuPage.java
0 → 100644
... | ... | @@ -0,0 +1,45 @@ |
1 | +package com.essa.pageObject.GoodsManage; | |
2 | + | |
3 | +import org.openqa.selenium.WebDriver; | |
4 | +import org.openqa.selenium.WebElement; | |
5 | +import org.openqa.selenium.support.FindBy; | |
6 | + | |
7 | +import com.essa.framework.BasePage; | |
8 | + | |
9 | +/** | |
10 | + * @author Administrator | |
11 | + *编辑spu页 | |
12 | + */ | |
13 | +public class EditSpuPage extends BasePage { | |
14 | + public EditSpuPage(WebDriver driver) { | |
15 | + super(driver); | |
16 | + } | |
17 | + /* | |
18 | + * 页面元素定位 | |
19 | + */ | |
20 | + | |
21 | + //上传图片 | |
22 | + @FindBy(xpath="//*[@class='webuploader-element-invisible']/../label") | |
23 | + WebElement upDatePic; | |
24 | + | |
25 | + //保存 | |
26 | + @FindBy(xpath="//*[text()='保存']") | |
27 | + WebElement save; | |
28 | + | |
29 | + /* | |
30 | + * 页面方法 | |
31 | + */ | |
32 | + | |
33 | + /** | |
34 | + * 编辑spu图片 | |
35 | + * @return GoodsRelesePage | |
36 | + * @throws InterruptedException | |
37 | + */ | |
38 | + public GoodsRelesePage editSpuPic() throws InterruptedException { | |
39 | + moveHeightScroll("30"); | |
40 | + jsExecutorClick(upDatePic); | |
41 | + moveHeightScroll("0"); | |
42 | + click(save); | |
43 | + return new GoodsRelesePage(driver); | |
44 | + } | |
45 | +} | ... | ... |
src/test/java/com/essa/pageObject/GoodsManage/GoodsBankPage.java
0 → 100644
... | ... | @@ -0,0 +1,49 @@ |
1 | +package com.essa.pageObject.GoodsManage; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import com.essa.framework.BasePage; | |
7 | +import com.essa.framework.Model; | |
8 | + | |
9 | +/** | |
10 | + * @author Administrator | |
11 | + *商品库页 | |
12 | + */ | |
13 | +public class GoodsBankPage extends BasePage { | |
14 | + public GoodsBankPage(WebDriver driver) { | |
15 | + super(driver); | |
16 | + } | |
17 | + /* | |
18 | + * 页面元素定位 | |
19 | + */ | |
20 | + | |
21 | + //商品名称 | |
22 | + private WebElement getSkuName() { | |
23 | + String no = AddOriginalGoodsPage.skuNameNo; | |
24 | + return driver.findElement(By.xpath("//*[contains(text(),'"+no+"')]")); | |
25 | + } | |
26 | + | |
27 | + //商品编号 | |
28 | + private WebElement getSkuNo() { | |
29 | + String no = AddOriginalGoodsPage.skuNameNo; | |
30 | + return driver.findElement(By.xpath("//*[contains(text(),'"+no+"')]/../li[3]")); | |
31 | + } | |
32 | + | |
33 | + /* | |
34 | + * 页面方法 | |
35 | + */ | |
36 | + | |
37 | + /** | |
38 | + * 获取商品编号 | |
39 | + * @return No | |
40 | + */ | |
41 | + public String getNo() { | |
42 | +// forceWait(2000); | |
43 | +// mywait(getSkuName()); | |
44 | + dynamicWait(By.xpath("//*[@id='undercarriageGoods']/tbody[1]/tr[1]/td[1]/input")); | |
45 | + String skuNo = getSkuNo().getText(); | |
46 | + Model.setSkuNo(skuNo); | |
47 | + return skuNo; | |
48 | + } | |
49 | +} | ... | ... |
src/test/java/com/essa/pageObject/GoodsManage/GoodsRelesePage.java
0 → 100644
... | ... | @@ -0,0 +1,89 @@ |
1 | +package com.essa.pageObject.GoodsManage; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | + | |
10 | +/** | |
11 | + * @author Administrator | |
12 | + *商品发布管理 | |
13 | + */ | |
14 | +public class GoodsRelesePage extends BasePage { | |
15 | + public GoodsRelesePage(WebDriver driver) { | |
16 | + super(driver); | |
17 | + } | |
18 | + /* | |
19 | + * 元素定位 | |
20 | + */ | |
21 | + | |
22 | + //商品发布--检查点 | |
23 | + @FindBy(xpath="//*[text()='商品发布']") | |
24 | + WebElement checkPoint; | |
25 | + | |
26 | + /* | |
27 | + //勾选第1个复选框--后续最好根据商品名称来定位勾选框 | |
28 | + @FindBy(xpath="//*[@ng-table='preUploadCtrlTableParams']/tbody[1]/tr[1]/td[1]/input") | |
29 | + WebElement checkBox; | |
30 | + */ | |
31 | + | |
32 | + /** | |
33 | + * 根据商品名称获得其复选框 | |
34 | + * @return | |
35 | + */ | |
36 | + private WebElement getCheckBox() { | |
37 | + String no = AddOriginalGoodsPage.getSkuNameNo(); | |
38 | + return driver.findElement(By.xpath("//*[contains(text(),'"+no+"')]/../../td[1]/input")); | |
39 | + } | |
40 | + | |
41 | + //图片更新 | |
42 | + @FindBy(xpath="//*[contains(text(),'图片更新')]") | |
43 | + WebElement updatePic; | |
44 | + | |
45 | + //编辑 | |
46 | + @FindBy(xpath="//*[contains(text(),'编辑')]") | |
47 | + WebElement edit; | |
48 | + | |
49 | + /* | |
50 | + * 页面方法 | |
51 | + */ | |
52 | + | |
53 | + /** | |
54 | + * 进入更新图片页面 | |
55 | + * @return UpdatePicPage | |
56 | + */ | |
57 | + public UpdatePicPage toUpDatePic() { | |
58 | + forceWait(1000); | |
59 | + isThisPage("商品发布", checkPoint); | |
60 | + dynamicWait(By.xpath("//*[@ng-table='preUploadCtrlTableParams']/tbody[1]/tr[1]/td[1]/input")); | |
61 | + click(getCheckBox()); | |
62 | + click(updatePic); | |
63 | + return new UpdatePicPage(driver); | |
64 | + } | |
65 | + | |
66 | + /** | |
67 | + * 进入编辑页面 | |
68 | + * @return EditSpuPage | |
69 | + * @throws InterruptedException | |
70 | + */ | |
71 | + public EditSpuPage toEditSpuPage() { | |
72 | + isThisPage("商品发布", checkPoint); | |
73 | + click(getCheckBox()); | |
74 | + click(edit); | |
75 | + return new EditSpuPage(driver); | |
76 | + } | |
77 | + | |
78 | + /** | |
79 | + * 断言商品建档是否成功 | |
80 | + * @return boolean | |
81 | + */ | |
82 | + public boolean isAddOrignalSucceed() { | |
83 | + forceWait(1000); | |
84 | + dynamicWait(By.xpath("//*[@ng-table='preUploadCtrlTableParams']/tbody[1]/tr[1]/td[1]/input")); | |
85 | + String SkuNameNo = AddOriginalGoodsPage.getSkuNameNo(); | |
86 | + //由于@findby只能输入常量,不能输入变量,所以这里用最底层的方法来寻找元素 | |
87 | + return isVisibility((driver.findElement(By.xpath("//*[contains(text(),'"+SkuNameNo+"')]")))); | |
88 | + } | |
89 | +} | ... | ... |
src/test/java/com/essa/pageObject/GoodsManage/MarketGoodsRelesePage.java
0 → 100644
... | ... | @@ -0,0 +1,54 @@ |
1 | +package com.essa.pageObject.GoodsManage; | |
2 | + | |
3 | +import org.openqa.selenium.WebDriver; | |
4 | +import org.openqa.selenium.WebElement; | |
5 | +import org.openqa.selenium.support.FindBy; | |
6 | + | |
7 | +import com.essa.framework.BasePage; | |
8 | +import com.essa.framework.Model; | |
9 | + | |
10 | +/** | |
11 | + * @author Administrator | |
12 | + *市场商品发布页 | |
13 | + */ | |
14 | +public class MarketGoodsRelesePage extends BasePage { | |
15 | + | |
16 | + public MarketGoodsRelesePage (WebDriver driver) { | |
17 | + super(driver); | |
18 | + } | |
19 | + /* | |
20 | + * 页面元素定位 | |
21 | + */ | |
22 | + | |
23 | + //采购商编号 | |
24 | + @FindBy (xpath="//*[@placeholder='请输入采购商编号']") | |
25 | + WebElement buyerNo; | |
26 | + | |
27 | + //查询按钮 | |
28 | + @FindBy (xpath="//*[text()='查询']") | |
29 | + WebElement search; | |
30 | + | |
31 | + //市场商品发布--列表第一个 | |
32 | + @FindBy (xpath="//*[@id='tableViewList']/div/div/div/div[2]/table/tbody/tr[1]/td[9]/button") | |
33 | + WebElement goodsRelese1; | |
34 | + | |
35 | + /* | |
36 | + * 页面方法 | |
37 | + */ | |
38 | + /** | |
39 | + * 选择采购商,点击市场发布,进入市场商品建档页面 | |
40 | + * @return AddMarketGoodsPage | |
41 | + */ | |
42 | + public AddMarketGoodsPage toAddMarketGoodsPage() { | |
43 | + mywait(goodsRelese1); | |
44 | + sendKeys(buyerNo, Model.getBuyerNo()); | |
45 | + click(search); | |
46 | + forceWait(1000); | |
47 | + mywait(goodsRelese1); | |
48 | + click(goodsRelese1); | |
49 | + forceWait(1000); | |
50 | + switchWindow(); | |
51 | + return new AddMarketGoodsPage(driver); | |
52 | + } | |
53 | + | |
54 | +} | ... | ... |
src/test/java/com/essa/pageObject/GoodsManage/UpdatePicPage.java
0 → 100644
... | ... | @@ -0,0 +1,97 @@ |
1 | +package com.essa.pageObject.GoodsManage; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | + | |
10 | +/** | |
11 | + * @author Administrator | |
12 | + *更新图片 | |
13 | + */ | |
14 | +public class UpdatePicPage extends BasePage { | |
15 | + public UpdatePicPage(WebDriver driver) { | |
16 | + super(driver); | |
17 | + } | |
18 | + public static String picPath; | |
19 | + | |
20 | + /* | |
21 | + * 元素定位 | |
22 | + */ | |
23 | + | |
24 | + //检查点 | |
25 | + @FindBy(xpath="//*[text()='SPU信息']") | |
26 | + WebElement checkPoint; | |
27 | + | |
28 | + //spu上传图片按钮 | |
29 | + @FindBy(xpath="//*[@id='spuWrapper']/div[3]/div[2]") | |
30 | + WebElement spuUploadPic; | |
31 | + | |
32 | + //spu的主图 | |
33 | + @FindBy(xpath="//*[@class='load-pic']") | |
34 | + WebElement spuPic; | |
35 | + | |
36 | + //sku上传图片按钮 | |
37 | + @FindBy(xpath="//*[@id='skuWrapper']/div/div/div[1]/div[2]") | |
38 | + WebElement skuUploadPic; | |
39 | + | |
40 | + //SKU图片上的X | |
41 | + @FindBy(xpath="//*[contains(@ng-click,'picInfo,')]") | |
42 | + WebElement skuPic; | |
43 | + | |
44 | + //保存按钮 | |
45 | + @FindBy(xpath="//*[text()='保存']") | |
46 | + WebElement save; | |
47 | + | |
48 | + //保存成功提示 | |
49 | + @FindBy(xpath="保存成功") | |
50 | + WebElement succeedMessage; | |
51 | + | |
52 | + /* | |
53 | + * 以下为页面方法 | |
54 | + */ | |
55 | + | |
56 | + /** | |
57 | + * 更新商品图片 | |
58 | + * @param picPath 作为商品图片的本机地址 | |
59 | + * @return GoodsRelesePage | |
60 | + */ | |
61 | + public GoodsRelesePage upDatePic() { | |
62 | + forceWait(2000); | |
63 | +// isThisPage("SPU信息", checkPoint); | |
64 | + dynamicWait(By.xpath("//*[text()='SPU信息']")); | |
65 | + click(spuUploadPic); | |
66 | + uploadFile(picPath); | |
67 | + //如果spu图片还在上传,则等待2秒 | |
68 | + while(!isElementExist(spuPic)) { | |
69 | + forceWait(2000); | |
70 | + } | |
71 | + click(skuUploadPic); | |
72 | + uploadFile(picPath); | |
73 | + //如果默认的sku图片还存在,说明图片还在上传,继续等待 | |
74 | + while (!isElementExist(skuPic)) { | |
75 | + forceWait(2000); | |
76 | + } | |
77 | + forceWait(1000); | |
78 | + click(save); | |
79 | + return new GoodsRelesePage(driver); | |
80 | + } | |
81 | + | |
82 | + /** | |
83 | + * 断言更新图片是否成功 | |
84 | + * @return | |
85 | + */ | |
86 | + public boolean isSucceed() { | |
87 | + return isElementExist(succeedMessage); | |
88 | + } | |
89 | + | |
90 | + /** | |
91 | + * 通过GUI设置本机图片路径 | |
92 | + * @param picpath | |
93 | + */ | |
94 | + public static void setPicPath(String picpath) { | |
95 | + picPath = picpath; | |
96 | + } | |
97 | +} | ... | ... |
src/test/java/com/essa/pageObject/buyPlaneManage/SkuCategoryManagerCongfigPage.java
0 → 100644
... | ... | @@ -0,0 +1,85 @@ |
1 | +package com.essa.pageObject.buyPlaneManage; | |
2 | + | |
3 | +import org.openqa.selenium.WebDriver; | |
4 | +import org.openqa.selenium.WebElement; | |
5 | +import org.openqa.selenium.support.FindBy; | |
6 | + | |
7 | +import com.essa.framework.BasePage; | |
8 | +import com.essa.framework.Model; | |
9 | + | |
10 | +/** | |
11 | + * @author Administrator | |
12 | + *商品类目经理管理配置页 | |
13 | + */ | |
14 | +public class SkuCategoryManagerCongfigPage extends BasePage { | |
15 | + public SkuCategoryManagerCongfigPage(WebDriver driver) { | |
16 | + super(driver); | |
17 | + } | |
18 | + /* | |
19 | + * 页面元素定位 | |
20 | + */ | |
21 | + | |
22 | + //查询输入框 | |
23 | + @FindBy (xpath="//*[@placeholder='请输入关键信息查询']") | |
24 | + WebElement searchContent; | |
25 | + | |
26 | + //高级查询 | |
27 | + @FindBy (xpath="//*[contains(text(),'高级查询')]") | |
28 | + WebElement advancedQuery; | |
29 | + | |
30 | + //sku编号 | |
31 | + @FindBy (xpath="//*[contains(text(),'SKU编号')]/../div/input") | |
32 | + WebElement skuNoQuery; | |
33 | + | |
34 | + //高级查询按钮 | |
35 | + @FindBy (xpath="//*[text()='查询']") | |
36 | + WebElement query; | |
37 | + | |
38 | + //查询按钮 | |
39 | + @FindBy (xpath="//*[@ng-click='search()']") | |
40 | + WebElement search; | |
41 | + | |
42 | + //右下角分页的GO按钮,用作检查点,等待页面加载完成 | |
43 | + @FindBy (xpath="//*[text()='GO']") | |
44 | + WebElement checkPoint; | |
45 | + | |
46 | + //列表第一条数据的复选框 | |
47 | + @FindBy (xpath="//*[@ng-table='tableParams']/tbody/tr[1]/td[1]/input") | |
48 | + WebElement firstCheckBox; | |
49 | + | |
50 | + //分配类目经理 | |
51 | + @FindBy (xpath="//*[text()='分配类目经理']") | |
52 | + WebElement distribute; | |
53 | + | |
54 | + //选择类目经理 | |
55 | + @FindBy (xpath="//*[@ng-model='mgrOpt']") | |
56 | + WebElement selectManager; | |
57 | + | |
58 | + //确认类目经理 | |
59 | + @FindBy(xpath="//*[text()='确认']") | |
60 | + WebElement confirm; | |
61 | + | |
62 | + /* | |
63 | + * 页面方法 | |
64 | + */ | |
65 | + /** | |
66 | + * 商品分配类目经理 | |
67 | + * @return SkuCategoryManagerCongfigPage | |
68 | + */ | |
69 | + public SkuCategoryManagerCongfigPage distributeManager() { | |
70 | + forceWait(1000); | |
71 | + mywait(advancedQuery); | |
72 | + click(advancedQuery); | |
73 | + sendKeys(skuNoQuery, Model.getSkuNo()); | |
74 | +// sendKeys(skuNoQuery, "200299305"); | |
75 | + click(query); | |
76 | + mywait(firstCheckBox); | |
77 | + click(firstCheckBox); | |
78 | + click(distribute); | |
79 | + mywait(confirm); | |
80 | + selectElement(selectManager, "林荣"); | |
81 | +// forceWait(1000); | |
82 | + click(confirm); | |
83 | + return new SkuCategoryManagerCongfigPage(driver); | |
84 | + } | |
85 | +} | ... | ... |
src/test/java/com/essa/pageObject/buyerManage/InvateCodePage.java
0 → 100644
... | ... | @@ -0,0 +1,69 @@ |
1 | +package com.essa.pageObject.buyerManage; | |
2 | + | |
3 | +import org.openqa.selenium.WebDriver; | |
4 | +import org.openqa.selenium.WebElement; | |
5 | +import org.openqa.selenium.support.FindBy; | |
6 | + | |
7 | +import com.essa.framework.BasePage; | |
8 | +import com.essa.framework.Model; | |
9 | + | |
10 | +/** | |
11 | + * @author Administrator | |
12 | + *邀请码生成页面 | |
13 | + */ | |
14 | +public class InvateCodePage extends BasePage { | |
15 | + public InvateCodePage(WebDriver driver) { | |
16 | + super(driver); | |
17 | + } | |
18 | + /* | |
19 | + * 元素定位 | |
20 | + */ | |
21 | + | |
22 | + //第一个业务员复选框 | |
23 | + @FindBy(xpath ="//*[text()='选择人员']/../div/dl/dd[1]/b/input") | |
24 | + WebElement firstCheckbox; | |
25 | + | |
26 | + //推广方式 | |
27 | + @FindBy (xpath="//select[contains(@ng-change,'changeChannelList')]") | |
28 | + WebElement spreadForm; | |
29 | + | |
30 | + //推广渠道 | |
31 | + @FindBy (xpath="//select[@ng-model='parame.create.promoteChannelId']") | |
32 | + WebElement spreadChannel; | |
33 | + | |
34 | + //生成 | |
35 | + @FindBy (xpath="//button[contains(text(),'生成')]") | |
36 | + WebElement create; | |
37 | + | |
38 | + //确认 | |
39 | + @FindBy (xpath ="//*[text()='确认']") | |
40 | + WebElement confirm; | |
41 | + | |
42 | + //关闭 | |
43 | + @FindBy (xpath ="//*[text()='关闭']") | |
44 | + WebElement close; | |
45 | + | |
46 | + //生成的邀请码 | |
47 | + @FindBy (xpath="//tbody[@class='ng-scope']/tr[1]/td[5]") | |
48 | + WebElement invateCode; | |
49 | + | |
50 | + /* | |
51 | + * 页面方法 | |
52 | + */ | |
53 | + /** | |
54 | + * 生成邀请码 | |
55 | + */ | |
56 | + public void generateCode() { | |
57 | + mywait(firstCheckbox); | |
58 | + click(firstCheckbox); | |
59 | + selectElement(spreadForm, "搜索引擎"); | |
60 | + selectElement(spreadChannel, "Google"); | |
61 | + click(create); | |
62 | + forceWait(500); | |
63 | + click(confirm); | |
64 | + forceWait(500); | |
65 | + click(close); | |
66 | + String code = invateCode.getText(); | |
67 | + Model.setInvateCode(code); | |
68 | + } | |
69 | +} | ... | ... |
src/test/java/com/essa/pageObject/inquiryManage/ProductInquiryFeedback.java
0 → 100644
... | ... | @@ -0,0 +1,76 @@ |
1 | +package com.essa.pageObject.inquiryManage; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | +import com.essa.framework.Model; | |
10 | + | |
11 | +/** | |
12 | + * @author Administrator | |
13 | + *成品询价反馈页 | |
14 | + */ | |
15 | +public class ProductInquiryFeedback extends BasePage { | |
16 | + public ProductInquiryFeedback(WebDriver driver) { | |
17 | + super(driver); | |
18 | + } | |
19 | + /* | |
20 | + * 元素定位 | |
21 | + */ | |
22 | + //查询类型 | |
23 | + @FindBy (xpath ="//*[@ng-change='changeSearchType()']") | |
24 | + WebElement searchType; | |
25 | + | |
26 | + //查询条件输入框 | |
27 | + @FindBy (xpath="//*[@placeholder='请输入查询条件']") | |
28 | + WebElement searchText; | |
29 | + | |
30 | + //查询按钮 | |
31 | + @FindBy (xpath ="//button[@ng-click='getFeedbackDetailBySearchInfo()']") | |
32 | + WebElement search; | |
33 | + | |
34 | + //单箱金额 | |
35 | + @FindBy (xpath="//*[contains(text(),'单箱金额')]") | |
36 | + WebElement singlePrice; | |
37 | + | |
38 | + //待反馈任务 | |
39 | + @FindBy (xpath="//*[contains(text(),'待反馈任务')]") | |
40 | + WebElement waitFeedback; | |
41 | + | |
42 | + //提交审核 | |
43 | + @FindBy (xpath="//*[@ng-click='submitFeedback(1)']") | |
44 | + WebElement submit; | |
45 | + | |
46 | + /* | |
47 | + * 页面方法 | |
48 | + */ | |
49 | + /** | |
50 | + * 提交询价任务 | |
51 | + * @return ProductInquiryTask | |
52 | + */ | |
53 | + public ProductInquiryTask submit() { | |
54 | + //根据单箱价格是否为空来判断页面是否加载成功 | |
55 | + while ("单箱金额:".equals(getText(singlePrice))) { | |
56 | + forceWait(1000); | |
57 | + } | |
58 | + selectElement(searchType, "商品编号"); | |
59 | + sendKeys(searchText,Model.getSkuNo()); | |
60 | + //根据sku编号来判断是否加载出想要的sku信息 | |
61 | + click(search); | |
62 | + boolean b = isVisibility(By.xpath("//*[contains(text(),'"+Model.getSkuNo()+"')]")); | |
63 | + while (!b) { | |
64 | + forceWait(1000); | |
65 | + } | |
66 | + click(waitFeedback); | |
67 | + //判断是否加载待反馈视图 | |
68 | + boolean b1 = isVisibility(By.xpath("//*[contains(text(),'询价要求完成时间')]")); | |
69 | + while(!b1) { | |
70 | + forceWait(1000); | |
71 | + } | |
72 | + moveHeightScroll("100"); | |
73 | + click(submit); | |
74 | + return new ProductInquiryTask(driver); | |
75 | + } | |
76 | +} | ... | ... |
src/test/java/com/essa/pageObject/inquiryManage/ProductInquiryTask.java
0 → 100644
... | ... | @@ -0,0 +1,74 @@ |
1 | +package com.essa.pageObject.inquiryManage; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | +import com.essa.framework.Model; | |
10 | + | |
11 | +/** | |
12 | + * @author Administrator | |
13 | + *成品询价任务列表 | |
14 | + */ | |
15 | +public class ProductInquiryTask extends BasePage { | |
16 | + public ProductInquiryTask(WebDriver driver) { | |
17 | + super(driver); | |
18 | + } | |
19 | + /* | |
20 | + * 元素定位 | |
21 | + */ | |
22 | + //高级查询 | |
23 | + @FindBy (xpath ="//*[contains(text(),'高级查询')]") | |
24 | + WebElement advancedQuery; | |
25 | + | |
26 | + //商品编码查询 | |
27 | + @FindBy (xpath="//*[text()='商品编码']/../div/input") | |
28 | + WebElement skuNoQuery; | |
29 | + | |
30 | + //高级查询-查询按钮 | |
31 | + @FindBy (xpath="//*[@name='advSearch']/div[12]/button[1]") | |
32 | + WebElement search; | |
33 | + | |
34 | + //列表第一行数据 | |
35 | + @FindBy (xpath ="//*[@ng-table='tableParams1']/tbody/tr[1]") | |
36 | + WebElement firstRow; | |
37 | + | |
38 | + //询价反馈 | |
39 | + @FindBy (xpath ="//*[contains(text(),'询价反馈')]") | |
40 | + WebElement feedBack; | |
41 | + | |
42 | + //暂无数据--用于检查是否已经成功 | |
43 | + @FindBy (xpath="//*[text()='暂无数据']") | |
44 | + WebElement isSucceed; | |
45 | + /* | |
46 | + * 页面方法 | |
47 | + */ | |
48 | + /** | |
49 | + * 查出要成品询价的商品,进入成品询价反馈页面 | |
50 | + * @return ProductInquiryFeedback | |
51 | + */ | |
52 | + public ProductInquiryFeedback toFeedback() { | |
53 | +// mywait(firstRow); | |
54 | + click(advancedQuery); | |
55 | + sendKeys(skuNoQuery, Model.getSkuNo()); | |
56 | + click(search); | |
57 | + mywait(firstRow); | |
58 | + click(firstRow); | |
59 | + click(feedBack); | |
60 | + return new ProductInquiryFeedback(driver); | |
61 | + } | |
62 | + | |
63 | + /** | |
64 | + * 判断页面是否查询不到该商品 | |
65 | + * @return boolean | |
66 | + */ | |
67 | + public boolean isSucceed() { | |
68 | + click(advancedQuery); | |
69 | + sendKeys(skuNoQuery, Model.getSkuNo()); | |
70 | + click(search); | |
71 | + forceWait(1000); | |
72 | + return isVisibility(By.xpath("//*[text()='暂无数据']")); | |
73 | + } | |
74 | +} | ... | ... |
src/test/java/com/essa/pageObject/marketingManage/CollectBillControlPage.java
0 → 100644
... | ... | @@ -0,0 +1,15 @@ |
1 | +package com.essa.pageObject.marketingManage; | |
2 | + | |
3 | +import org.openqa.selenium.WebDriver; | |
4 | + | |
5 | +import com.essa.framework.BasePage; | |
6 | + | |
7 | +/** | |
8 | + * @author Administrator | |
9 | + *集单控制 | |
10 | + */ | |
11 | +public class CollectBillControlPage extends BasePage { | |
12 | + public CollectBillControlPage(WebDriver driver) { | |
13 | + super(driver); | |
14 | + } | |
15 | +} | ... | ... |
src/test/java/com/essa/pageObject/marketingManage/CollectBillSettingPage.java
0 → 100644
... | ... | @@ -0,0 +1,225 @@ |
1 | +package com.essa.pageObject.marketingManage; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | +import com.essa.framework.Model; | |
10 | + | |
11 | +/** | |
12 | + * @author Administrator | |
13 | + *集单设置 | |
14 | + */ | |
15 | +public class CollectBillSettingPage extends BasePage { | |
16 | + public CollectBillSettingPage(WebDriver driver) { | |
17 | + super(driver); | |
18 | + } | |
19 | + /* | |
20 | + * 元素定位 | |
21 | + */ | |
22 | + | |
23 | + //添加商品-查询输入框 | |
24 | + @FindBy (xpath = "//*[@name='keyword']") | |
25 | + WebElement searchContent; | |
26 | + | |
27 | + //团购设置中的关键字输入框 | |
28 | + @FindBy (xpath="//*[@ng-model='searchKeyword']") | |
29 | + WebElement content; | |
30 | + | |
31 | + //查询按钮 | |
32 | + @FindBy (xpath = "//button[@ng-click='gotoSearch()']") | |
33 | + WebElement search; | |
34 | + | |
35 | + //添加商品 | |
36 | + @FindBy (xpath = "//*[text()='添加商品']") | |
37 | + WebElement addSku; | |
38 | + | |
39 | + //loading,判断是否加载完成 | |
40 | + @FindBy (xpath="//*[@class='loading ng-scope']") | |
41 | + WebElement loading; | |
42 | + | |
43 | + //查询列表中的第一个复选框 | |
44 | + @FindBy (xpath = "//*[@class='table marketing-collectbill-products']/tbody/tr[1]/td[1]/input") | |
45 | + WebElement firstCheckBox; | |
46 | + | |
47 | + //MOQ设置 | |
48 | + @FindBy (xpath = "//*[text()='MOQ设置']") | |
49 | + WebElement MOQSet; | |
50 | + | |
51 | + //阶梯价 | |
52 | + @FindBy (xpath = "//*[text()='阶梯价']") | |
53 | + WebElement setPrice; | |
54 | + | |
55 | + //配置主推市场 | |
56 | + @FindBy (xpath = "//*[text()='配置主推市场']") | |
57 | + WebElement mainMarket; | |
58 | + | |
59 | + //发布商品 | |
60 | + @FindBy (xpath = "//*[text()='发布商品']") | |
61 | + WebElement publishSku; | |
62 | + | |
63 | + //添加商品-查询按钮 | |
64 | + @FindBy (xpath = "//*[@ng-click='search(false)']") | |
65 | + WebElement addSkuSearch; | |
66 | + | |
67 | + //添加商品-展开商品信息 | |
68 | + @FindBy (xpath = "//*[contains(@class,'fa fa-angle-double-dow')]") | |
69 | + WebElement showSku; | |
70 | + | |
71 | + //添加商品-搜索结果复选框 | |
72 | + @FindBy (xpath = "//*[@ng-repeat='list in item.skus']/tbody/tr[1]/td[1]/input") | |
73 | + WebElement skuCheckbox; | |
74 | + | |
75 | + //确定按钮 | |
76 | + @FindBy (xpath = "//*[contains(text(),'确定')]") | |
77 | + WebElement confirm; | |
78 | + | |
79 | + //活动成功MOQ | |
80 | + @FindBy (xpath = "//*[@ng-model='activitySuccessMoq']") | |
81 | + WebElement successMoq; | |
82 | + | |
83 | + //活动销售MOQ | |
84 | + @FindBy (xpath = "//*[@ng-model='activitySaleMoq']") | |
85 | + WebElement saleMoq; | |
86 | + | |
87 | + //成本价格 | |
88 | + @FindBy (xpath = "//*[contains(text(),'成本')]") | |
89 | + WebElement firstCost; | |
90 | + | |
91 | + //最低价 | |
92 | + @FindBy (xpath = "//*[@ng-model='minPrice']") | |
93 | + WebElement minPrice; | |
94 | + | |
95 | + //最高价 | |
96 | + @FindBy (xpath = "//*[@ng-model='maxPrice']") | |
97 | + WebElement maxPrice; | |
98 | + | |
99 | + //阶梯数 | |
100 | + @FindBy (xpath = "//*[@ng-model='ladderCount']") | |
101 | + WebElement ladderCount; | |
102 | + | |
103 | + //生成阶梯 | |
104 | + @FindBy (xpath = "//*[text()='生成阶梯']") | |
105 | + WebElement creatLadder; | |
106 | + | |
107 | + //可选区域-东欧 | |
108 | + @FindBy (xpath = "//*[contains(text(),'可选择的市场区域')]/../dd/span[1]/input") | |
109 | + WebElement easternEurope; | |
110 | + | |
111 | + //可选区域-南美 | |
112 | + @FindBy (xpath = "//*[contains(text(),'可选择的市场区域')]/../dd/span[2]/input") | |
113 | + WebElement southAmerican; | |
114 | + | |
115 | + //可选区域-欧美 | |
116 | + @FindBy (xpath = "//*[contains(text(),'可选择的市场区域')]/../dd/span[3]/input") | |
117 | + WebElement europeAndAmerica; | |
118 | + | |
119 | + //可选区域-东南亚 | |
120 | + @FindBy (xpath = "//*[contains(text(),'可选择的市场区域')]/../dd/span[4]/input") | |
121 | + WebElement southeastAsia; | |
122 | + | |
123 | + //可选区域-中东 | |
124 | + @FindBy (xpath = "//*[contains(text(),'可选择的市场区域')]/../dd/span[5]/input") | |
125 | + WebElement middleEast; | |
126 | + | |
127 | + /* | |
128 | + * 页面方法 | |
129 | + */ | |
130 | + /** | |
131 | + * 添加商品 | |
132 | + */ | |
133 | + public void addSku() { | |
134 | + mywait(addSku); | |
135 | + click(addSku); | |
136 | +// System.out.println(Model.getSkuNo()); | |
137 | + while (isVisibility(By.xpath("//*[@class='loading ng-scope']"))) { | |
138 | + forceWait(1000); | |
139 | + }; | |
140 | + sendKeys(searchContent, Model.getSkuNo()); | |
141 | +// sendKeys(searchContent, "200299327"); | |
142 | + click(addSkuSearch); | |
143 | + forceWait(1000); | |
144 | + click(showSku); | |
145 | + click(skuCheckbox); | |
146 | + click(confirm); | |
147 | + } | |
148 | + | |
149 | + /** | |
150 | + * 设置MOQ | |
151 | + */ | |
152 | + public void setMoq() { | |
153 | + forceWait(1000); | |
154 | + mywait(firstCheckBox); | |
155 | + sendKeys(content, Model.getSkuNo()); | |
156 | +// sendKeys(searchContent, "200299345"); | |
157 | + click(search); | |
158 | + mywait(firstCheckBox); | |
159 | + click(firstCheckBox); | |
160 | + click(MOQSet); | |
161 | +//===================================================================此处要修改 | |
162 | + sendKeys(successMoq, "150"); | |
163 | + sendKeys(saleMoq, "15"); | |
164 | + click(confirm); | |
165 | + } | |
166 | + /** | |
167 | + * 设置阶梯价 | |
168 | + */ | |
169 | + public void setPrice() { | |
170 | + forceWait(1000); | |
171 | + click(setPrice); | |
172 | + mywait(creatLadder); | |
173 | + int firstCost = getFirstCost(); | |
174 | + System.out.println(firstCost); | |
175 | + sendKeys(minPrice, firstCost+30+""); | |
176 | + sendKeys(maxPrice, firstCost+100+""); | |
177 | + sendKeys(ladderCount, "2"); | |
178 | + click(creatLadder); | |
179 | + forceWait(1000); | |
180 | + click(confirm); | |
181 | + } | |
182 | + /** | |
183 | + * 设置主推市场 | |
184 | + */ | |
185 | + public void setMarket() { | |
186 | + forceWait(1000); | |
187 | + click(mainMarket); | |
188 | + mywait(easternEurope); | |
189 | + click(easternEurope); | |
190 | + click(southAmerican); | |
191 | + click(easternEurope); | |
192 | + click(southeastAsia); | |
193 | + click(middleEast); | |
194 | + click(confirm); | |
195 | + forceWait(1000); | |
196 | + click(confirm); | |
197 | + } | |
198 | + | |
199 | + /** | |
200 | + * 组装以上操作 | |
201 | + * 添加商品并发布团购 | |
202 | + * @return GroupSettingPage | |
203 | + */ | |
204 | + public GroupSettingPage publishGroup() { | |
205 | + addSku(); | |
206 | + setMoq(); | |
207 | + setPrice(); | |
208 | + setMarket(); | |
209 | + forceWait(1000); | |
210 | + click(publishSku); | |
211 | + forceWait(1000); | |
212 | + click(confirm); | |
213 | + return new GroupSettingPage(driver); | |
214 | + } | |
215 | + | |
216 | + /** | |
217 | + * 获取到商品的成本价 | |
218 | + * @return price | |
219 | + */ | |
220 | + private int getFirstCost() { | |
221 | + String p = partialStr(firstCost.getText(), "成本:¥"); | |
222 | + int price = Integer.parseInt(p); | |
223 | + return price; | |
224 | + } | |
225 | +} | ... | ... |
src/test/java/com/essa/pageObject/marketingManage/GroupControlPage.java
0 → 100644
... | ... | @@ -0,0 +1,45 @@ |
1 | +package com.essa.pageObject.marketingManage; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | +import com.essa.framework.Model; | |
10 | + | |
11 | +/** | |
12 | + * @author Administrator | |
13 | + *团购控制 | |
14 | + */ | |
15 | +public class GroupControlPage extends BasePage { | |
16 | + public GroupControlPage(WebDriver driver) { | |
17 | + super(driver); | |
18 | + } | |
19 | + /* | |
20 | + * 页面元素定位 | |
21 | + */ | |
22 | + | |
23 | + //关键字查询输入 | |
24 | + @FindBy (xpath = "//*[@ng-model='searchKeyword']") | |
25 | + WebElement searchKeyword; | |
26 | + | |
27 | + //查询按钮 | |
28 | + @FindBy (xpath = "//*[@ng-click='gotoSearch()']") | |
29 | + WebElement search; | |
30 | + | |
31 | + /* | |
32 | + * 页面方法 | |
33 | + */ | |
34 | + /** | |
35 | + * 判断团购的商品是否发布成功 | |
36 | + * @return boolean | |
37 | + */ | |
38 | + public boolean isSuccess() { | |
39 | + mywait(searchKeyword); | |
40 | + sendKeys(searchKeyword, Model.getSkuNo()); | |
41 | + click(search); | |
42 | + forceWait(1500); | |
43 | + return isVisibility(By.xpath("//*[contains(text(),'"+Model.getSkuNo()+"')]")); | |
44 | + } | |
45 | +} | ... | ... |
src/test/java/com/essa/pageObject/marketingManage/GroupSettingPage.java
0 → 100644
... | ... | @@ -0,0 +1,224 @@ |
1 | +package com.essa.pageObject.marketingManage; | |
2 | + | |
3 | +import org.openqa.selenium.By; | |
4 | +import org.openqa.selenium.WebDriver; | |
5 | +import org.openqa.selenium.WebElement; | |
6 | +import org.openqa.selenium.support.FindBy; | |
7 | + | |
8 | +import com.essa.framework.BasePage; | |
9 | +import com.essa.framework.Model; | |
10 | + | |
11 | +/** | |
12 | + * @author Administrator | |
13 | + *团购设置 | |
14 | + */ | |
15 | +public class GroupSettingPage extends BasePage { | |
16 | + public GroupSettingPage(WebDriver driver) { | |
17 | + super(driver); | |
18 | + } | |
19 | + /* | |
20 | + * 元素定位 | |
21 | + */ | |
22 | + | |
23 | + //添加商品-查询输入框 | |
24 | + @FindBy (xpath = "//*[@name='keyword']") | |
25 | + WebElement searchContent; | |
26 | + | |
27 | + //团购设置中的关键字输入框 | |
28 | + @FindBy (xpath="//*[@ng-model='searchKeyword']") | |
29 | + WebElement content; | |
30 | + | |
31 | + //查询按钮 | |
32 | + @FindBy (xpath = "//button[@ng-click='gotoSearch()']") | |
33 | + WebElement search; | |
34 | + | |
35 | + //添加商品 | |
36 | + @FindBy (xpath = "//*[text()='添加商品']") | |
37 | + WebElement addSku; | |
38 | + | |
39 | + //loading,判断是否加载完成 | |
40 | + @FindBy (xpath="//*[@class='loading ng-scope']") | |
41 | + WebElement loading; | |
42 | + | |
43 | + //查询列表中的第一个复选框 | |
44 | + @FindBy (xpath = "//*[@class='table marketing-collectbill-products']/tbody/tr[1]/td[1]/input") | |
45 | + WebElement firstCheckBox; | |
46 | + | |
47 | + //MOQ设置 | |
48 | + @FindBy (xpath = "//*[text()='MOQ设置']") | |
49 | + WebElement MOQSet; | |
50 | + | |
51 | + //阶梯价 | |
52 | + @FindBy (xpath = "//*[text()='阶梯价']") | |
53 | + WebElement setPrice; | |
54 | + | |
55 | + //配置主推市场 | |
56 | + @FindBy (xpath = "//*[text()='配置主推市场']") | |
57 | + WebElement mainMarket; | |
58 | + | |
59 | + //发布商品 | |
60 | + @FindBy (xpath = "//*[text()='发布商品']") | |
61 | + WebElement publishSku; | |
62 | + | |
63 | + //添加商品-查询按钮 | |
64 | + @FindBy (xpath = "//*[@ng-click='search(false)']") | |
65 | + WebElement addSkuSearch; | |
66 | + | |
67 | + //添加商品-展开商品信息 | |
68 | + @FindBy (xpath = "//*[contains(@class,'fa fa-angle-double-dow')]") | |
69 | + WebElement showSku; | |
70 | + | |
71 | + //添加商品-搜索结果复选框 | |
72 | + @FindBy (xpath = "//*[@ng-repeat='list in item.skus']/tbody/tr[1]/td[1]/input") | |
73 | + WebElement skuCheckbox; | |
74 | + | |
75 | + //确定按钮 | |
76 | + @FindBy (xpath = "//*[contains(text(),'确定')]") | |
77 | + WebElement confirm; | |
78 | + | |
79 | + //活动成功MOQ | |
80 | + @FindBy (xpath = "//*[@ng-model='activitySuccessMoq']") | |
81 | + WebElement successQoq; | |
82 | + | |
83 | + //活动销售MOQ | |
84 | + @FindBy (xpath = "//*[@ng-model='activitySaleMoq']") | |
85 | + WebElement saleQoq; | |
86 | + | |
87 | + //成本价格 | |
88 | + @FindBy (xpath = "//*[contains(text(),'成本')]") | |
89 | + WebElement firstCost; | |
90 | + | |
91 | + //最低价 | |
92 | + @FindBy (xpath = "//*[@ng-model='minPrice']") | |
93 | + WebElement minPrice; | |
94 | + | |
95 | + //最高价 | |
96 | + @FindBy (xpath = "//*[@ng-model='maxPrice']") | |
97 | + WebElement maxPrice; | |
98 | + | |
99 | + //阶梯数 | |
100 | + @FindBy (xpath = "//*[@ng-model='ladderCount']") | |
101 | + WebElement ladderCount; | |
102 | + | |
103 | + //生成阶梯 | |
104 | + @FindBy (xpath = "//*[text()='生成阶梯']") | |
105 | + WebElement creatLadder; | |
106 | + | |
107 | + //可选区域-东欧 | |
108 | + @FindBy (xpath = "//*[contains(text(),'可选择的市场区域')]/../dd/span[1]/input") | |
109 | + WebElement easternEurope; | |
110 | + | |
111 | + //可选区域-南美 | |
112 | + @FindBy (xpath = "//*[contains(text(),'可选择的市场区域')]/../dd/span[2]/input") | |
113 | + WebElement southAmerican; | |
114 | + | |
115 | + //可选区域-欧美 | |
116 | + @FindBy (xpath = "//*[contains(text(),'可选择的市场区域')]/../dd/span[3]/input") | |
117 | + WebElement europeAndAmerica; | |
118 | + | |
119 | + //可选区域-东南亚 | |
120 | + @FindBy (xpath = "//*[contains(text(),'可选择的市场区域')]/../dd/span[4]/input") | |
121 | + WebElement southeastAsia; | |
122 | + | |
123 | + //可选区域-中东 | |
124 | + @FindBy (xpath = "//*[contains(text(),'可选择的市场区域')]/../dd/span[5]/input") | |
125 | + WebElement middleEast; | |
126 | + | |
127 | + /* | |
128 | + * 页面方法 | |
129 | + */ | |
130 | + /** | |
131 | + * 添加商品 | |
132 | + */ | |
133 | + public void addSku() { | |
134 | + mywait(addSku); | |
135 | + click(addSku); | |
136 | +// System.out.println(Model.getSkuNo()); | |
137 | + while (isVisibility(By.xpath("//*[@class='loading ng-scope']"))) { | |
138 | + forceWait(1000); | |
139 | + }; | |
140 | + sendKeys(searchContent, Model.getSkuNo()); | |
141 | +// sendKeys(searchContent, "200299327"); | |
142 | + click(addSkuSearch); | |
143 | + forceWait(1000); | |
144 | + click(showSku); | |
145 | + click(skuCheckbox); | |
146 | + click(confirm); | |
147 | + } | |
148 | + | |
149 | + /** | |
150 | + * 设置MOQ | |
151 | + */ | |
152 | + public void setMoq() { | |
153 | + forceWait(1000); | |
154 | + mywait(firstCheckBox); | |
155 | + sendKeys(content, Model.getSkuNo()); | |
156 | +// sendKeys(searchContent, "200299345"); | |
157 | + click(search); | |
158 | + mywait(firstCheckBox); | |
159 | + click(firstCheckBox); | |
160 | + click(MOQSet); | |
161 | + sendKeys(successQoq, "150"); | |
162 | + sendKeys(saleQoq, "15"); | |
163 | + click(confirm); | |
164 | + } | |
165 | + /** | |
166 | + * 设置阶梯价 | |
167 | + */ | |
168 | + public void setPrice() { | |
169 | + forceWait(1000); | |
170 | + click(setPrice); | |
171 | + mywait(creatLadder); | |
172 | + int firstCost = getFirstCost(); | |
173 | + System.out.println(firstCost); | |
174 | + sendKeys(minPrice, firstCost+30+""); | |
175 | + sendKeys(maxPrice, firstCost+100+""); | |
176 | + sendKeys(ladderCount, "2"); | |
177 | + click(creatLadder); | |
178 | + forceWait(1000); | |
179 | + click(confirm); | |
180 | + } | |
181 | + /** | |
182 | + * 设置主推市场 | |
183 | + */ | |
184 | + public void setMarket() { | |
185 | + forceWait(1000); | |
186 | + click(mainMarket); | |
187 | + mywait(easternEurope); | |
188 | + click(easternEurope); | |
189 | + click(southAmerican); | |
190 | + click(easternEurope); | |
191 | + click(southeastAsia); | |
192 | + click(middleEast); | |
193 | + click(confirm); | |
194 | + forceWait(1000); | |
195 | + click(confirm); | |
196 | + } | |
197 | + | |
198 | + /** | |
199 | + * 组装以上操作 | |
200 | + * 添加商品并发布团购 | |
201 | + * @return GroupSettingPage | |
202 | + */ | |
203 | + public GroupSettingPage publishGroup() { | |
204 | + addSku(); | |
205 | + setMoq(); | |
206 | + setPrice(); | |
207 | + setMarket(); | |
208 | + forceWait(1000); | |
209 | + click(publishSku); | |
210 | + forceWait(1000); | |
211 | + click(confirm); | |
212 | + return new GroupSettingPage(driver); | |
213 | + } | |
214 | + | |
215 | + /** | |
216 | + * 获取到商品的成本价 | |
217 | + * @return price | |
218 | + */ | |
219 | + private int getFirstCost() { | |
220 | + String p = partialStr(firstCost.getText(), "成本:¥"); | |
221 | + int price = Integer.parseInt(p); | |
222 | + return price; | |
223 | + } | |
224 | +} | ... | ... |
src/test/java/com/essa/pageObject/productDev/AddProjectPage.java
0 → 100644
... | ... | @@ -0,0 +1,75 @@ |
1 | +package com.essa.pageObject.productDev; | |
2 | + | |
3 | +import org.openqa.selenium.WebDriver; | |
4 | +import org.openqa.selenium.WebElement; | |
5 | +import org.openqa.selenium.support.FindBy; | |
6 | + | |
7 | +import com.essa.framework.BasePage; | |
8 | + | |
9 | +/** | |
10 | + * @author Administrator | |
11 | + *新增项目立项书 | |
12 | + */ | |
13 | +public class AddProjectPage extends BasePage { | |
14 | + public AddProjectPage(WebDriver driver) { | |
15 | + super(driver); | |
16 | + } | |
17 | + /* | |
18 | + * 元素定位 | |
19 | + */ | |
20 | + //改版类型 | |
21 | + @FindBy (xpath ="//*[@dic-list='改版类型']") | |
22 | + WebElement revisonType; | |
23 | + | |
24 | + //项目名称 | |
25 | + @FindBy (xpath ="//*[@ng-model='model.name']") | |
26 | + WebElement projectName; | |
27 | + | |
28 | + //项目负责人 | |
29 | + @FindBy (xpath ="//*[@ng-model='model.leaderId']/input") | |
30 | + WebElement projectLeader; | |
31 | + | |
32 | + //项目负责人-林荣 | |
33 | + @FindBy (xpath ="//*[@id='role-user-select-box']/ul/li[3]/span") | |
34 | + WebElement linrong; | |
35 | + | |
36 | + //开发程度 | |
37 | + @FindBy (xpath ="//*[@dic-list='开发程度']") | |
38 | + WebElement devLevel; | |
39 | + | |
40 | + //开发系列 | |
41 | + @FindBy (xpath ="//*[@ng-model='model.serialId']") | |
42 | + WebElement devSerial; | |
43 | + | |
44 | + //团队成员-新增 | |
45 | + @FindBy (xpath ="//button[text()='新增']") | |
46 | + WebElement addMember; | |
47 | + | |
48 | + //任务处理人 -第一个 | |
49 | + @FindBy (xpath ="//*[@class='col-md-14']/table/tbody/tr[1]/td[2]/div/input") | |
50 | + WebElement Transactor1; | |
51 | + | |
52 | + //处理人-linrong | |
53 | + @FindBy (xpath ="//*[@id='role-user-select-box']/ul/li[3]/span") | |
54 | + WebElement linrong1; | |
55 | + | |
56 | + //任务处理人 -第二个 | |
57 | + @FindBy (xpath ="//*[@class='col-md-14']/table/tbody/tr[2]/td[2]/div/input") | |
58 | + WebElement Transactor2; | |
59 | + | |
60 | + //成员角色 -第一个 | |
61 | + @FindBy (xpath ="//*[@class='col-md-14']/table/tbody/tr[1]/td[3]/select") | |
62 | + WebElement role1; | |
63 | + | |
64 | + //成员角色 -第二个 | |
65 | + @FindBy (xpath ="//*[@class='col-md-14']/table/tbody/tr[2]/td[3]/select") | |
66 | + WebElement role2; | |
67 | + | |
68 | + //选择改版商品信息 | |
69 | + @FindBy (xpath ="//*[text()='选择']") | |
70 | + WebElement selectGoods; | |
71 | + | |
72 | + //保存 | |
73 | + @FindBy (xpath ="//*[contains(text(),'保存')]") | |
74 | + WebElement save; | |
75 | +} | ... | ... |
src/test/java/com/essa/testSuite/TestAddMarketGoods.java
0 → 100644
... | ... | @@ -0,0 +1,86 @@ |
1 | +package com.essa.testSuite; | |
2 | + | |
3 | +import java.io.IOException; | |
4 | + | |
5 | +import org.openqa.selenium.WebDriver; | |
6 | +import org.openqa.selenium.support.PageFactory; | |
7 | +import org.testng.annotations.AfterClass; | |
8 | +import org.testng.annotations.BeforeClass; | |
9 | +import org.testng.annotations.Test; | |
10 | +import org.testng.asserts.SoftAssert; | |
11 | + | |
12 | +import com.essa.framework.Model; | |
13 | +import com.essa.pageObject.BaseTest; | |
14 | +import com.essa.pageObject.HomePage; | |
15 | +import com.essa.pageObject.GoodsManage.AddMarketGoodsPage; | |
16 | +import com.essa.pageObject.GoodsManage.AuditMarketGoodsPage; | |
17 | +import com.essa.pageObject.GoodsManage.AuditMarketOpreatePage; | |
18 | +import com.essa.pageObject.GoodsManage.MarketGoodsRelesePage; | |
19 | + | |
20 | +/** | |
21 | + * @author Administrator | |
22 | + *测试用例:添加市场商品 | |
23 | + */ | |
24 | +public class TestAddMarketGoods extends BaseTest { | |
25 | + | |
26 | + WebDriver driver; | |
27 | + | |
28 | + @BeforeClass | |
29 | + public void setUp() throws IOException { | |
30 | + initsetUp(); | |
31 | + loginValid("maomeixiang"); | |
32 | + } | |
33 | + /** | |
34 | + * 进入市场商品发布页,选择对应的采购商 | |
35 | + */ | |
36 | + @Test(description="进入市场商品发布列表,选择采购商") | |
37 | + public void toMarketGoodsRelesePage() { | |
38 | + this.driver = getDriver(); | |
39 | + HomePage homePage = PageFactory.initElements(driver, HomePage.class); | |
40 | + homePage.toMarketGoodsRelesePage(); | |
41 | + MarketGoodsRelesePage marketGoodsRelesePage = PageFactory.initElements(driver, MarketGoodsRelesePage.class); | |
42 | + marketGoodsRelesePage.toAddMarketGoodsPage(); | |
43 | + } | |
44 | + /** | |
45 | + * 市场商品建档 | |
46 | + */ | |
47 | + @Test(description="市场商品建档") | |
48 | + public void addMarketGoods() { | |
49 | + this.driver = getDriver(); | |
50 | + AddMarketGoodsPage addMarketGoodsPage = PageFactory.initElements(driver, AddMarketGoodsPage.class); | |
51 | + addMarketGoodsPage.addMarketGoods(); | |
52 | + | |
53 | + //断言是否建档成功,如果model中的skuNo不为null则成功 | |
54 | + SoftAssert softAssert = new SoftAssert(); | |
55 | + boolean actual = !(Model.getSkuNo().isEmpty()); | |
56 | + softAssert.assertEquals(actual, true, "市场商品建档失败"); | |
57 | + softAssert.assertAll(); | |
58 | + | |
59 | + HomePage homePage = PageFactory.initElements(driver, HomePage.class); | |
60 | + homePage.getHome(); | |
61 | + homePage.logout(); | |
62 | + } | |
63 | + /** | |
64 | + * 对市场商品进行审核 | |
65 | + */ | |
66 | + @Test(description="市场商品审核") | |
67 | + public void auditMarketGoods() { | |
68 | + loginValid("xingchangyong"); | |
69 | + HomePage homePage = PageFactory.initElements(driver, HomePage.class); | |
70 | + homePage.toAuditMarketGoodsPage(); | |
71 | + AuditMarketGoodsPage auditMarketGoodsPage = PageFactory.initElements(driver, AuditMarketGoodsPage.class); | |
72 | + auditMarketGoodsPage.auditMarketGoods(); | |
73 | + AuditMarketOpreatePage auditMarketOpreatePage = PageFactory.initElements(driver, AuditMarketOpreatePage.class); | |
74 | + auditMarketOpreatePage.auditPass(); | |
75 | + //断言是否审核成功 | |
76 | + boolean actual = auditMarketGoodsPage.isSucceed(); | |
77 | + SoftAssert softAssert = new SoftAssert(); | |
78 | + softAssert.assertEquals(actual, false, "市场商品审核失败!"); | |
79 | + softAssert.assertAll(); | |
80 | + } | |
81 | + | |
82 | + @AfterClass | |
83 | + public void tearDown() { | |
84 | + driver.quit(); | |
85 | + } | |
86 | +} | ... | ... |
src/test/java/com/essa/testSuite/TestAddOriginalGoods.java
0 → 100644
... | ... | @@ -0,0 +1,118 @@ |
1 | +package com.essa.testSuite; | |
2 | + | |
3 | +import java.io.IOException; | |
4 | + | |
5 | +import org.openqa.selenium.WebDriver; | |
6 | +import org.openqa.selenium.support.PageFactory; | |
7 | +import org.testng.annotations.AfterClass; | |
8 | +import org.testng.annotations.BeforeClass; | |
9 | +import org.testng.annotations.Test; | |
10 | +import org.testng.asserts.SoftAssert; | |
11 | + | |
12 | +import com.essa.pageObject.BaseTest; | |
13 | +import com.essa.pageObject.HomePage; | |
14 | +import com.essa.pageObject.GoodsManage.AddOriginalGoodsPage; | |
15 | +import com.essa.pageObject.GoodsManage.AuditOriginalGoodsPage; | |
16 | +import com.essa.pageObject.GoodsManage.AuditOriginalOpreatePage; | |
17 | +import com.essa.pageObject.GoodsManage.GoodsBankPage; | |
18 | +import com.essa.pageObject.GoodsManage.GoodsRelesePage; | |
19 | +import com.essa.pageObject.GoodsManage.UpdatePicPage; | |
20 | + | |
21 | +/** | |
22 | + * @author Administrator | |
23 | + *测试用例:天机原厂商品 | |
24 | + */ | |
25 | +public class TestAddOriginalGoods extends BaseTest { | |
26 | + | |
27 | + WebDriver driver; | |
28 | + | |
29 | + @BeforeClass | |
30 | + public void setUp() throws IOException { | |
31 | + initsetUp(); | |
32 | + loginValid("linxun"); | |
33 | + } | |
34 | + | |
35 | + /** | |
36 | + * 商品建档 | |
37 | + * | |
38 | + * @throws InterruptedException | |
39 | + */ | |
40 | + @Test(description="原厂商品建档") | |
41 | + public void toAddOriginalGoodsPage() throws InterruptedException { | |
42 | + this.driver = getDriver(); | |
43 | + HomePage homePage = PageFactory.initElements(driver, HomePage.class); | |
44 | + homePage.tOriginalGoodsPage(); | |
45 | + AddOriginalGoodsPage addOriginalGoodsPage = PageFactory.initElements(driver, AddOriginalGoodsPage.class); | |
46 | +// addOriginalGoodsPage.addOriginalGoods("物料分析"); | |
47 | + addOriginalGoodsPage.addOriginalGoods(); | |
48 | + | |
49 | + } | |
50 | + | |
51 | + /** | |
52 | + * 更新商品图片 | |
53 | + * | |
54 | + * @throws Exception | |
55 | + * @throws InterruptedException | |
56 | + */ | |
57 | + @Test(description="更新图片") | |
58 | + public void updatePic() throws Exception { | |
59 | + this.driver = getDriver(); | |
60 | + HomePage homePage = PageFactory.initElements(driver, HomePage.class); | |
61 | + homePage.tGoodsRelesePage(); | |
62 | + GoodsRelesePage goodsRelesePage = PageFactory.initElements(driver, GoodsRelesePage.class); | |
63 | + | |
64 | + //断言上一步商品建档是否成功 | |
65 | + boolean actual = goodsRelesePage.isAddOrignalSucceed(); | |
66 | + SoftAssert assertion = new SoftAssert(); | |
67 | + assertion.assertEquals(actual, true, "商品建档失败!"); | |
68 | + assertion.assertAll(); | |
69 | + | |
70 | + goodsRelesePage.toUpDatePic(); | |
71 | + UpdatePicPage updatePicPage = PageFactory.initElements(driver, UpdatePicPage.class); | |
72 | + // 传入要上传的图片的本机地址 | |
73 | +// updatePicPage.upDatePic("C:\\Users\\Administrator\\Pictures\\Camera Roll\\4.jpg"); | |
74 | + updatePicPage.upDatePic(); | |
75 | + } | |
76 | + | |
77 | + /** | |
78 | + * 审核原厂商品 | |
79 | + */ | |
80 | + @Test(description="原厂商品审核") | |
81 | + public void auditOriginal() { | |
82 | + this.driver = getDriver(); | |
83 | + HomePage homePage = PageFactory.initElements(driver, HomePage.class); | |
84 | + homePage.toAuditOriginalGoodsPage(); | |
85 | + AuditOriginalGoodsPage auditOriginalGoodsPage = PageFactory.initElements(driver, AuditOriginalGoodsPage.class); | |
86 | + // 断言上一步更新图片是否成功 | |
87 | + boolean actual1 = auditOriginalGoodsPage.isSucceed(); | |
88 | + SoftAssert assertion = new SoftAssert(); | |
89 | + assertion.assertEquals(actual1, true, "更新图片失败!"); | |
90 | + | |
91 | + auditOriginalGoodsPage.toAuditOriginalSku(); | |
92 | + AuditOriginalOpreatePage auditOriginalOpreatePage = PageFactory.initElements(driver, | |
93 | + AuditOriginalOpreatePage.class); | |
94 | + auditOriginalOpreatePage.auditPass(); | |
95 | + | |
96 | + // 断言是否审核成功,如果发布审核页面没有找到刚刚的商品,说明审核成功了 | |
97 | + boolean actual = auditOriginalGoodsPage.isSucceed(); | |
98 | + assertion.assertEquals(actual, false, "审核原厂商品时失败!"); | |
99 | + assertion.assertAll(); | |
100 | + } | |
101 | + | |
102 | + /** | |
103 | + * 获取新增的商品编号 | |
104 | + */ | |
105 | + @Test(description="去商品库获取添加的sku编号") | |
106 | + public void getSkuNo() { | |
107 | + this.driver = getDriver(); | |
108 | + HomePage homePage = PageFactory.initElements(driver, HomePage.class); | |
109 | + homePage.toGoodsBankPage(); | |
110 | + GoodsBankPage goodsBankPage = PageFactory.initElements(driver, GoodsBankPage.class); | |
111 | + goodsBankPage.getNo(); | |
112 | + } | |
113 | + | |
114 | + @AfterClass | |
115 | + public void tearDown() { | |
116 | + driver.quit(); | |
117 | + } | |
118 | +} | ... | ... |
src/test/java/com/essa/testSuite/TestGenrateCode.java
0 → 100644
... | ... | @@ -0,0 +1,45 @@ |
1 | +package com.essa.testSuite; | |
2 | + | |
3 | +import java.io.IOException; | |
4 | + | |
5 | +import org.openqa.selenium.WebDriver; | |
6 | +import org.openqa.selenium.support.PageFactory; | |
7 | +import org.testng.annotations.AfterClass; | |
8 | +import org.testng.annotations.BeforeClass; | |
9 | +import org.testng.annotations.Test; | |
10 | + | |
11 | +import com.essa.pageObject.BaseTest; | |
12 | +import com.essa.pageObject.HomePage; | |
13 | +import com.essa.pageObject.buyerManage.InvateCodePage; | |
14 | + | |
15 | +/** | |
16 | + * @author Administrator | |
17 | + *测试用例:生成邀请码 | |
18 | + */ | |
19 | +public class TestGenrateCode extends BaseTest { | |
20 | + | |
21 | +WebDriver driver; | |
22 | + | |
23 | + @BeforeClass | |
24 | + public void setUp() throws IOException { | |
25 | + initsetUp(); | |
26 | + loginValid("admin"); | |
27 | + } | |
28 | + | |
29 | + @AfterClass | |
30 | + public void tearDown() { | |
31 | + driver.quit(); | |
32 | + } | |
33 | + | |
34 | + /** | |
35 | + * 生成邀请码 | |
36 | + */ | |
37 | + @Test(description="生成采购商注册邀请码") | |
38 | + public void genrateCode() { | |
39 | + this.driver = getDriver(); | |
40 | + HomePage homePage = PageFactory.initElements(driver, HomePage.class); | |
41 | + homePage.toInvateCodePage(); | |
42 | + InvateCodePage invateCodePage = PageFactory.initElements(driver, InvateCodePage.class); | |
43 | + invateCodePage.generateCode(); | |
44 | + } | |
45 | +} | ... | ... |
src/test/java/com/essa/testSuite/TestGroupPurchase.java
0 → 100644
... | ... | @@ -0,0 +1,75 @@ |
1 | +package com.essa.testSuite; | |
2 | + | |
3 | +import org.openqa.selenium.WebDriver; | |
4 | +import org.openqa.selenium.support.PageFactory; | |
5 | +import org.testng.annotations.AfterClass; | |
6 | +import org.testng.annotations.BeforeClass; | |
7 | +import org.testng.annotations.Test; | |
8 | +import org.testng.asserts.SoftAssert; | |
9 | + | |
10 | +import com.essa.pageObject.BaseTest; | |
11 | +import com.essa.pageObject.HomePage; | |
12 | +import com.essa.pageObject.buyPlaneManage.SkuCategoryManagerCongfigPage; | |
13 | +import com.essa.pageObject.marketingManage.GroupControlPage; | |
14 | +import com.essa.pageObject.marketingManage.GroupSettingPage; | |
15 | + | |
16 | +/** | |
17 | + * @author Administrator | |
18 | + *测试用例:发布团购 | |
19 | + */ | |
20 | +public class TestGroupPurchase extends BaseTest { | |
21 | + | |
22 | + WebDriver driver; | |
23 | + | |
24 | + @BeforeClass | |
25 | + public void setUp() { | |
26 | + initsetUp(); | |
27 | + loginValid("linrong"); | |
28 | + } | |
29 | + | |
30 | + /** | |
31 | + * 配置商品类目经理 | |
32 | + */ | |
33 | + @Test(description="配置商品类目经理") | |
34 | + public void SkuCategoryManagerCongfig() { | |
35 | + this.driver = getDriver(); | |
36 | + HomePage homePage = PageFactory.initElements(driver, HomePage.class); | |
37 | + homePage.toSkuCategoryManagerCongfig(); | |
38 | + SkuCategoryManagerCongfigPage skuCategoryManagerCongfigPage = PageFactory.initElements(driver, | |
39 | + SkuCategoryManagerCongfigPage.class); | |
40 | + skuCategoryManagerCongfigPage.distributeManager(); | |
41 | + } | |
42 | + | |
43 | + /** | |
44 | + * 发布团购商品 | |
45 | + */ | |
46 | + @Test(description="发布团购") | |
47 | + public void publishGroupPurchase() { | |
48 | + this.driver = getDriver(); | |
49 | + HomePage homePage = PageFactory.initElements(driver, HomePage.class); | |
50 | + homePage.toGroupSettingPage(); | |
51 | + GroupSettingPage groupSettingPage = PageFactory.initElements(driver, GroupSettingPage.class); | |
52 | + groupSettingPage.publishGroup(); | |
53 | + } | |
54 | + | |
55 | + /** | |
56 | + * 进入团购控制,查找是否有发布成功,并进行断言 | |
57 | + */ | |
58 | + @Test(description="检查团购是否发布成功") | |
59 | + public void isPublish() { | |
60 | + this.driver = getDriver(); | |
61 | + HomePage homePage = PageFactory.initElements(driver, HomePage.class); | |
62 | + homePage.toGroupControlPage(); | |
63 | + GroupControlPage groupControlPage = PageFactory.initElements(driver, GroupControlPage.class); | |
64 | + boolean actual = groupControlPage.isSuccess(); | |
65 | + SoftAssert softAssert = new SoftAssert(); | |
66 | + softAssert.assertEquals(actual, true, "发布团购失败了!"); | |
67 | + softAssert.assertAll(); | |
68 | + } | |
69 | + | |
70 | + @AfterClass | |
71 | + public void tearDown() { | |
72 | + driver.quit(); | |
73 | + } | |
74 | + | |
75 | +} | ... | ... |
src/test/java/com/essa/testSuite/TestProductInquiry.java
0 → 100644
... | ... | @@ -0,0 +1,50 @@ |
1 | +package com.essa.testSuite; | |
2 | + | |
3 | +import org.openqa.selenium.WebDriver; | |
4 | +import org.openqa.selenium.support.PageFactory; | |
5 | +import org.testng.annotations.AfterClass; | |
6 | +import org.testng.annotations.BeforeClass; | |
7 | +import org.testng.annotations.Test; | |
8 | +import org.testng.asserts.SoftAssert; | |
9 | + | |
10 | +import com.essa.pageObject.BaseTest; | |
11 | +import com.essa.pageObject.HomePage; | |
12 | +import com.essa.pageObject.inquiryManage.ProductInquiryFeedback; | |
13 | +import com.essa.pageObject.inquiryManage.ProductInquiryTask; | |
14 | + | |
15 | +/** | |
16 | + * @author Administrator | |
17 | + *测试用例:成品询价 | |
18 | + */ | |
19 | +public class TestProductInquiry extends BaseTest { | |
20 | + | |
21 | + WebDriver driver; | |
22 | + | |
23 | + @BeforeClass | |
24 | + public void setUp() { | |
25 | + initsetUp(); | |
26 | + loginValid("chenhong"); | |
27 | + } | |
28 | + @AfterClass | |
29 | + public void tearDown() { | |
30 | + driver.quit(); | |
31 | + } | |
32 | + | |
33 | + /** | |
34 | + * 成品询价 | |
35 | + */ | |
36 | + @Test(description="成品询价流程") | |
37 | + public void productInquiry() { | |
38 | + this.driver = getDriver(); | |
39 | + HomePage homePage = PageFactory.initElements(driver, HomePage.class); | |
40 | + homePage.toProductInquiryTask(); | |
41 | + ProductInquiryTask productInquiryTask = PageFactory.initElements(driver, ProductInquiryTask.class); | |
42 | + productInquiryTask.toFeedback(); | |
43 | + ProductInquiryFeedback productInquiryFeedback = PageFactory.initElements(driver, ProductInquiryFeedback.class); | |
44 | + productInquiryFeedback.submit(); | |
45 | + //断言 | |
46 | + SoftAssert softAssert = new SoftAssert(); | |
47 | + softAssert.assertEquals(productInquiryTask.isSucceed(), true, "成品询价失败!"); | |
48 | + softAssert.assertAll(); | |
49 | + } | |
50 | +} | ... | ... |
... | ... | @@ -0,0 +1,521 @@ |
1 | +package demo; | |
2 | + | |
3 | +import java.awt.EventQueue; | |
4 | + | |
5 | +import javax.swing.JFrame; | |
6 | +import javax.swing.ButtonGroup; | |
7 | +import javax.swing.JButton; | |
8 | +import java.awt.event.ActionListener; | |
9 | +import java.io.BufferedReader; | |
10 | +import java.io.File; | |
11 | +import java.io.InputStream; | |
12 | +import java.io.InputStreamReader; | |
13 | +import java.text.SimpleDateFormat; | |
14 | +import java.util.ArrayList; | |
15 | +import java.util.Date; | |
16 | +import java.util.List; | |
17 | +import java.awt.event.ActionEvent; | |
18 | +import javax.swing.JTextField; | |
19 | + | |
20 | +import org.apache.xmlbeans.impl.xb.xsdschema.Public; | |
21 | +import org.testng.TestNG; | |
22 | + | |
23 | +import com.essa.framework.BrowserEngine; | |
24 | +import com.essa.framework.Logger; | |
25 | +import com.essa.framework.Model; | |
26 | +import com.essa.pageObject.GoodsManage.AddOriginalGoodsPage; | |
27 | +import com.essa.pageObject.GoodsManage.GoodsBankPage; | |
28 | +import com.essa.pageObject.GoodsManage.UpdatePicPage; | |
29 | + | |
30 | +import javax.swing.JLabel; | |
31 | +import javax.swing.JRadioButton; | |
32 | +import javax.swing.JComboBox; | |
33 | +import javax.swing.JFileChooser; | |
34 | +import javax.swing.JScrollPane; | |
35 | +import javax.swing.JTextArea; | |
36 | + | |
37 | +import java.awt.Color; | |
38 | +import javax.swing.DefaultComboBoxModel; | |
39 | +import javax.swing.ImageIcon; | |
40 | +import java.awt.Toolkit; | |
41 | +import java.awt.BorderLayout; | |
42 | +import java.awt.Choice; | |
43 | +import java.awt.Font; | |
44 | +import java.awt.Graphics; | |
45 | + | |
46 | +import javax.swing.JList; | |
47 | +import javax.swing.JMenuBar; | |
48 | +import javax.swing.JTextPane; | |
49 | +import java.awt.event.InputMethodListener; | |
50 | +import java.awt.event.InputMethodEvent; | |
51 | +import java.beans.VetoableChangeListener; | |
52 | +import java.beans.PropertyChangeEvent; | |
53 | +import javax.swing.JPanel; | |
54 | +import java.beans.PropertyChangeListener; | |
55 | +import java.awt.event.MouseAdapter; | |
56 | +import java.awt.event.MouseEvent; | |
57 | +import javax.swing.UIManager; | |
58 | +import java.awt.TextField; | |
59 | +import java.awt.Panel; | |
60 | +import javax.swing.JScrollBar; | |
61 | +import javax.swing.ScrollPaneConstants; | |
62 | +import javax.swing.border.LineBorder; | |
63 | + | |
64 | +/** | |
65 | + * @author Administrator | |
66 | + *图形化 | |
67 | + */ | |
68 | +public class firstDemo { | |
69 | + | |
70 | + private JFrame frmvBy; | |
71 | + private JTextField supplierName; | |
72 | + private JTextField buyerNo2; | |
73 | + public static String no; | |
74 | + private JTextField account; | |
75 | + private JTextField SkuNo; | |
76 | + private JTextField password; | |
77 | + private JTextField registerAccount; | |
78 | + | |
79 | + /** | |
80 | + * Launch the application. | |
81 | + */ | |
82 | + public static void main(String[] args) { | |
83 | + EventQueue.invokeLater(new Runnable() { | |
84 | + public void run() { | |
85 | + try { | |
86 | + firstDemo window = new firstDemo(); | |
87 | + window.frmvBy.setVisible(true); | |
88 | + } catch (Exception e) { | |
89 | + e.printStackTrace(); | |
90 | + } | |
91 | + } | |
92 | + }); | |
93 | + } | |
94 | + | |
95 | + /** | |
96 | + * Create the application. | |
97 | + */ | |
98 | + public firstDemo() { | |
99 | + initialize(); | |
100 | + | |
101 | + } | |
102 | + public String getCurrentTime() { | |
103 | + SimpleDateFormat format = new SimpleDateFormat("[yyyy-MM-dd HH:mm:ss] "); | |
104 | + Date today = new Date(); | |
105 | + String time = format.format(today); | |
106 | + return time; | |
107 | + } | |
108 | + | |
109 | + /** | |
110 | + * Initialize the contents of the frame. | |
111 | + */ | |
112 | + private void initialize() { | |
113 | + frmvBy = new JFrame("ESSA自动化测试工具v1.0.0"); | |
114 | + frmvBy.getContentPane().setBackground(UIManager.getColor("Button.background")); | |
115 | + frmvBy.setTitle("ESSA自动化测试工具v1.0.1"); | |
116 | + frmvBy.setIconImage(Toolkit.getDefaultToolkit().getImage(firstDemo.class.getResource("/demo/icon2.png"))); | |
117 | + frmvBy.getContentPane().setEnabled(false); | |
118 | + frmvBy.setResizable(false); | |
119 | + frmvBy.setBackground(UIManager.getColor("Button.background")); | |
120 | + frmvBy.setForeground(Color.LIGHT_GRAY); | |
121 | + frmvBy.setBounds(650, 350, 526, 467); | |
122 | + frmvBy.setSize(686, 405); | |
123 | + frmvBy.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
124 | + frmvBy.getContentPane().setLayout(null); | |
125 | + | |
126 | + final JTextArea ja; | |
127 | + JScrollPane jsp; | |
128 | + ja = new JTextArea(); | |
129 | + jsp = new JScrollPane(ja); | |
130 | + jsp.setBounds(22, 186, 631, 134); | |
131 | + frmvBy.getContentPane().add(jsp); | |
132 | + | |
133 | + ja.setEditable(false); | |
134 | + ja.setWrapStyleWord(true); | |
135 | + ja.setLineWrap(true); | |
136 | + ja.setFont(new Font("微软雅黑", Font.PLAIN, 13)); | |
137 | +// ja.append("提示:建议使用版本号为68.0的Chrome浏览器\r\n"); | |
138 | + ja.append(getCurrentTime()+"默认选择场景:新增原厂商品\r\n"); | |
139 | + | |
140 | + JLabel label = new JLabel("操作环境:"); | |
141 | + label.setBounds(24, 53, 78, 15); | |
142 | + label.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
143 | + frmvBy.getContentPane().add(label); | |
144 | + | |
145 | + final JPanel ToCart = new JPanel(); | |
146 | + ToCart.setBounds(231, 42, 230, 128); | |
147 | + ToCart.setVisible(false); | |
148 | + frmvBy.getContentPane().add(ToCart); | |
149 | + ToCart.setLayout(null); | |
150 | + | |
151 | + JLabel label_1 = new JLabel("可视化操作:"); | |
152 | + label_1.setBounds(10, 119, 88, 15); | |
153 | + label_1.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
154 | + frmvBy.getContentPane().add(label_1); | |
155 | + | |
156 | + JRadioButton view = new JRadioButton("是"); | |
157 | + view.setBounds(103, 115, 42, 23); | |
158 | + view.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
159 | + view.setSelected(true); | |
160 | + frmvBy.getContentPane().add(view); | |
161 | + | |
162 | + JRadioButton notView = new JRadioButton("否"); | |
163 | + notView.setBounds(160, 115, 44, 23); | |
164 | + notView.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
165 | + notView.setEnabled(false); | |
166 | + frmvBy.getContentPane().add(notView); | |
167 | + | |
168 | + ButtonGroup group = new ButtonGroup(); | |
169 | + group.add(view); | |
170 | + group.add(notView); | |
171 | + | |
172 | + final JLabel process = new JLabel(); | |
173 | + process.setBounds(474, 25, 179, 170); | |
174 | + process.setForeground(Color.GRAY); | |
175 | + process.setFont(new Font("微软雅黑", Font.PLAIN, 12)); | |
176 | + process.setText("<html><body>新增原厂商品场景流程:<br>1.商品建档<br>2.更新商品图片<br>3.审核商品<br>4.检查商品库,验证是否新增成功<br>PS:以上均由账号(linxun)操作<br><br></body></html>"); | |
177 | + frmvBy.getContentPane().add(process); | |
178 | + | |
179 | + JLabel label_2 = new JLabel("操作场景:"); | |
180 | + label_2.setBounds(24, 87, 78, 15); | |
181 | + label_2.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
182 | + frmvBy.getContentPane().add(label_2); | |
183 | + | |
184 | + | |
185 | + final JPanel addOriginal = new JPanel(); | |
186 | + addOriginal.setBounds(231, 37, 234, 134); | |
187 | + addOriginal.setVisible(true); | |
188 | + frmvBy.getContentPane().add(addOriginal); | |
189 | + addOriginal.setLayout(null); | |
190 | + | |
191 | + final JComboBox selectSystem = new JComboBox<String>(); | |
192 | + selectSystem.setBounds(102, 51, 114, 20); | |
193 | + selectSystem.addActionListener(new ActionListener() { | |
194 | + public void actionPerformed(ActionEvent e) { | |
195 | + if ("SIT".equals((String)selectSystem.getSelectedItem())) { | |
196 | + Model.setEnv("SIT"); | |
197 | + ja.append(getCurrentTime()+"已选择环境:SIT\r\n"); | |
198 | + }else if ("DIT".equals((String)selectSystem.getSelectedItem())) { | |
199 | + Model.setEnv("DIT"); | |
200 | + ja.append(getCurrentTime()+"已选择环境:DIT\r\n"); | |
201 | + }else if ("HOTFIX".equals((String)selectSystem.getSelectedItem())) { | |
202 | + Model.setEnv("HOTFIX"); | |
203 | + ja.append(getCurrentTime()+"已选择环境:HOTFIX\r\n"); | |
204 | + }else if ("UAT".equals((String)selectSystem.getSelectedItem())){ | |
205 | + Model.setEnv("UAT"); | |
206 | + ja.append(getCurrentTime()+"已选择环境:UAT\r\n"); | |
207 | + } | |
208 | +// Model.setEnv((String)selectSystem.getSelectedItem()); | |
209 | + } | |
210 | + }); | |
211 | + selectSystem.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
212 | + selectSystem.addItem("SIT"); | |
213 | + selectSystem.addItem("HOTFIX"); | |
214 | + selectSystem.addItem("UAT"); | |
215 | + selectSystem.addItem("DIT"); | |
216 | + frmvBy.getContentPane().add(selectSystem); | |
217 | + | |
218 | + final JPanel addMarket = new JPanel(); | |
219 | + addMarket.setBounds(0, 67, 230, 46); | |
220 | + addOriginal.add(addMarket); | |
221 | + addMarket.setVisible(false); | |
222 | + addMarket.setLayout(null); | |
223 | + | |
224 | + final JComboBox browser = new JComboBox(); | |
225 | + browser.setEnabled(false); | |
226 | + browser.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
227 | + browser.setBounds(102, 147, 114, 20); | |
228 | + browser.setModel(new DefaultComboBoxModel(new String[] {"Chrome", "Firefox", "IE"})); | |
229 | + frmvBy.getContentPane().add(browser); | |
230 | + | |
231 | + final JComboBox selectScene = new JComboBox(); | |
232 | + selectScene.setBounds(102, 85, 114, 20); | |
233 | + selectScene.setForeground(Color.BLACK); | |
234 | + selectScene.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
235 | + selectScene.addActionListener(new ActionListener() { | |
236 | + public void actionPerformed(ActionEvent e) { | |
237 | + if ("新增原厂商品".equals((String)selectScene.getSelectedItem())) { | |
238 | + process.setText("<html><body>新增原厂商品场景流程:<br>1.商品建档<br>2.更新商品图片<br>3.审核商品<br>4.检查商品库,验证是否新增成功<br>PS:以上均由账号(linxun)操作<br><br></body></html>"); | |
239 | + addOriginal.setVisible(true); | |
240 | + addMarket.setVisible(false); | |
241 | + ToCart.setVisible(false); | |
242 | + ja.append(getCurrentTime()+"已选择场景:新增原厂商品\r\n"); | |
243 | + }else if("新增市场商品".equals((String)selectScene.getSelectedItem())) { | |
244 | + process.setText("<html><body>新增市场商品场景流程:<br>" + | |
245 | + "1.指定采购商编号(默认:RUS00833)<br>" + | |
246 | + "2.使用账号(maomeixiang)对指定采购商进行市场商品建档并选择审核人为\"邢昌勇\"<br>" + | |
247 | + "3.使用账号(xingchangyong)对市场商品审核<br></body></html>"); | |
248 | + addMarket.setVisible(true); | |
249 | + ToCart.setVisible(false); | |
250 | + ja.append(getCurrentTime()+"已选择场景:新增市场商品\r\n"); | |
251 | + }else if("发布团购".equals((String)selectScene.getSelectedItem())) { | |
252 | + ja.append(getCurrentTime()+"已选择场景:发布团购,运行过程中将会打开关闭浏览器2次!\r\n"); | |
253 | + process.setText("<html><body>发布团购场景流程:<br><font color=\"red\">1.先执行新增原厂商品流程,生成一个原厂SKU</font><br>2.使用账号(linrong)为新增的SKU分配类目经理<br>3.团购设置中添加该SKU,并发布团购,验证团购发布结果</body></html>"); | |
254 | + addOriginal.setVisible(true); | |
255 | + addMarket.setVisible(false); | |
256 | + ToCart.setVisible(false); | |
257 | + }else if ("采购商注册".equals((String)selectScene.getSelectedItem())) { | |
258 | + addOriginal.setVisible(false); | |
259 | + ToCart.setVisible(false); | |
260 | + ja.append(getCurrentTime()+"已选择场景:采购商注册,运行过程中将会打开关闭浏览器2次!\r\n"); | |
261 | + process.setText("<html><body>采购商注册流程:<br>1.使用账号(admin)在bpms后台生成一个邀请码<br>2.采购商平台填写注册信息,并填入上一步生成的邀请码<br>PS:新账号密码默认为:essa123<br><br><br></body></html>"); | |
262 | + }else if ("添加SKU至购物车".equals((String)selectScene.getSelectedItem())) { | |
263 | + addOriginal.setVisible(false); | |
264 | + ToCart.setVisible(true); | |
265 | + ja.append(getCurrentTime()+"已选择场景:添加SKU至购物车\r\n"); | |
266 | + process.setText("<html><body>添加SKU至购物车流程:<br>1.Buyer平台根据填入的采购<br>商信息进行登录操作<br>2.若未填写商品编号,将从数<br>据库随机查出一个符合要求的<br>sku添加至购物车<br><br><br></body></html>"); | |
267 | + }else if ("成品询价".equals((String)selectScene.getSelectedItem())) { | |
268 | + ToCart.setVisible(true); | |
269 | + ja.append(getCurrentTime()+"已选择场景:成品询价,运行过程中将会打开关闭浏览器2次!\r\n"); | |
270 | + process.setText("<html><body>成品询价流程:<br>1.Buyer平台根据填入的采购<br>商信息加入sku,若未填写sku<br>编号,将随机从数据库获取符<br>合要求的sku<br>2.bpms后台登录账号(chenhong)对该sku进行成<br>品询价审核<br></body></html>"); | |
271 | + }else if ("提交PO".equals((String)selectScene.getSelectedItem())) { | |
272 | + ToCart.setVisible(true); | |
273 | + ja.append(getCurrentTime()+"已选择场景:提交PO,运行过程中将会打开关闭浏览器3次!\r\n"); | |
274 | + process.setText("<html><body>提交PO流程:<br>1.采购商平台加入商品至购物车<br>2.bpms后台登录账号(chenhong)对该sku进行成品询价审核<br>3.再次登录采购商平台,进行拼柜、设置唛头、贴纸和提交PO操作</body></html>"); | |
275 | + } | |
276 | + } | |
277 | + }); | |
278 | + selectScene.setModel(new DefaultComboBoxModel(new String[] {"新增原厂商品", "新增市场商品", "发布团购", "采购商注册", "成品询价", "提交PO"})); | |
279 | + frmvBy.getContentPane().add(selectScene); | |
280 | + | |
281 | + JLabel label_3 = new JLabel("供应商名称:"); | |
282 | + label_3.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
283 | + label_3.setBounds(9, 15, 91, 15); | |
284 | + addOriginal.add(label_3); | |
285 | + | |
286 | + supplierName = new JTextField(); | |
287 | + supplierName.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
288 | + supplierName.setForeground(Color.BLACK); | |
289 | + supplierName.setBounds(92, 10, 114, 25); | |
290 | + addOriginal.add(supplierName); | |
291 | + supplierName.setText("ESSA"); | |
292 | + supplierName.setColumns(10); | |
293 | + | |
294 | + JButton button = new JButton("选择图片"); | |
295 | + button.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
296 | + button.setBounds(91, 44, 91, 23); | |
297 | + addOriginal.add(button); | |
298 | + | |
299 | + JLabel lblSku = new JLabel("商品图片:"); | |
300 | + lblSku.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
301 | + lblSku.setBounds(22, 48, 70, 15); | |
302 | + addOriginal.add(lblSku); | |
303 | + | |
304 | + final JLabel label_7 = new JLabel("*必填"); | |
305 | + label_7.setFont(new Font("微软雅黑", Font.PLAIN, 12)); | |
306 | + label_7.setBounds(192, 48, 42, 15); | |
307 | + addOriginal.add(label_7); | |
308 | + label_7.setForeground(Color.RED); | |
309 | + | |
310 | + final JLabel picPath = new JLabel(""); | |
311 | + picPath.setVisible(false); | |
312 | + addOriginal.add(picPath); | |
313 | + | |
314 | + JLabel label_5 = new JLabel("采购商编号:"); | |
315 | + label_5.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
316 | + label_5.setBounds(8, 15, 86, 15); | |
317 | + addMarket.add(label_5); | |
318 | + | |
319 | + buyerNo2 = new JTextField(); | |
320 | + buyerNo2.setBounds(93, 11, 114, 25); | |
321 | + addMarket.add(buyerNo2); | |
322 | + buyerNo2.setFont(new Font("宋体", Font.PLAIN, 14)); | |
323 | + buyerNo2.setText("RUS00833"); | |
324 | + buyerNo2.setColumns(10); | |
325 | + | |
326 | + button.addActionListener(new ActionListener() { | |
327 | + public void actionPerformed(ActionEvent e) { | |
328 | + JFileChooser jf = new JFileChooser(); | |
329 | + jf.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES ); | |
330 | + jf.showDialog(new JLabel(), "选择图片"); | |
331 | + File file=jf.getSelectedFile(); | |
332 | + String s = null; | |
333 | + try { | |
334 | + s = file.getAbsolutePath(); | |
335 | + } catch (NullPointerException exception) { | |
336 | + } | |
337 | + if(s == "" || s == null) { | |
338 | + ja.append(getCurrentTime()+"您未选择图片,请选择图片\r\n"); | |
339 | + }else { | |
340 | + ja.append(getCurrentTime()+"选择的图片为:"+s+"\r\n"); | |
341 | + picPath.setText(s); | |
342 | + label_7.setText("已选"); | |
343 | + } | |
344 | + } | |
345 | + }); | |
346 | + | |
347 | + JLabel label_4 = new JLabel("浏览器:"); | |
348 | + label_4.setBounds(38, 149, 62, 15); | |
349 | + label_4.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
350 | + frmvBy.getContentPane().add(label_4); | |
351 | + | |
352 | + JButton btnNewButton = new JButton("开 始"); | |
353 | + btnNewButton.setBounds(551, 325, 101, 35); | |
354 | + frmvBy.getContentPane().add(btnNewButton); | |
355 | + btnNewButton.setFont(new Font("微软雅黑", Font.PLAIN, 17)); | |
356 | + | |
357 | + | |
358 | + JLabel lblEssav = new JLabel("ESSA自动化测试工具 V1.0.1"); | |
359 | + lblEssav.setBounds(225, 10, 228, 29); | |
360 | + lblEssav.setFont(new Font("微软雅黑", Font.BOLD, 16)); | |
361 | + frmvBy.getContentPane().add(lblEssav); | |
362 | + | |
363 | + JLabel lblwindowsjdkbug = new JLabel("<html><body>提示:1.建议使用版本号为68.0的Chrome浏览器<br> 2.由于部分操作会用到鼠标事件,若运行时手动切换界面可能会导致运行出错</body></html>"); | |
364 | + lblwindowsjdkbug.setFont(new Font("微软雅黑", Font.PLAIN, 12)); | |
365 | + lblwindowsjdkbug.setBounds(25, 323, 456, 40); | |
366 | + frmvBy.getContentPane().add(lblwindowsjdkbug); | |
367 | + | |
368 | + | |
369 | + JLabel Account = new JLabel("采购商账号:"); | |
370 | + Account.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
371 | + Account.setBounds(9, 10, 88, 15); | |
372 | + ToCart.add(Account); | |
373 | + | |
374 | + JLabel Password = new JLabel("密码:"); | |
375 | + Password.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
376 | + Password.setBounds(50, 41, 65, 15); | |
377 | + ToCart.add(Password); | |
378 | + | |
379 | + JLabel No = new JLabel("商品编号:"); | |
380 | + No.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
381 | + No.setBounds(22, 75, 88, 15); | |
382 | + ToCart.add(No); | |
383 | + | |
384 | + account = new JTextField(); | |
385 | + account.setText("buyer11159@essa.cn"); | |
386 | + account.setFont(new Font("微软雅黑", Font.PLAIN, 12)); | |
387 | + account.setBounds(92, 4, 130, 25); | |
388 | + ToCart.add(account); | |
389 | + account.setColumns(10); | |
390 | + | |
391 | + password = new JTextField(); | |
392 | + password.setText("essa123"); | |
393 | + password.setToolTipText(""); | |
394 | + password.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
395 | + password.setBounds(92, 37, 130, 25); | |
396 | + ToCart.add(password); | |
397 | + password.setColumns(10); | |
398 | + | |
399 | + SkuNo = new JTextField(); | |
400 | + SkuNo.setText("选填,勿填活动商品"); | |
401 | + SkuNo.setForeground(Color.LIGHT_GRAY); | |
402 | + SkuNo.setFont(new Font("微软雅黑", Font.PLAIN, 13)); | |
403 | + SkuNo.addMouseListener(new MouseAdapter() { | |
404 | + @Override | |
405 | + public void mouseClicked(MouseEvent e) { | |
406 | + if (SkuNo.getText().equals("选填,勿填活动商品")) { | |
407 | + SkuNo.setForeground(Color.black); | |
408 | + SkuNo.setText(""); | |
409 | + } | |
410 | + } | |
411 | + }); | |
412 | + SkuNo.setBounds(92, 70, 130, 25); | |
413 | + ToCart.add(SkuNo); | |
414 | + SkuNo.setColumns(10); | |
415 | + | |
416 | + JPanel register = new JPanel(); | |
417 | + register.setBounds(231, 42, 224, 134); | |
418 | + frmvBy.getContentPane().add(register); | |
419 | + | |
420 | + JLabel RegisterAccount = new JLabel("采购商邮箱:"); | |
421 | + register.add(RegisterAccount); | |
422 | + RegisterAccount.setFont(new Font("微软雅黑", Font.PLAIN, 14)); | |
423 | + | |
424 | + registerAccount = new JTextField(); | |
425 | + registerAccount.setForeground(Color.LIGHT_GRAY); | |
426 | + registerAccount.setText("若不填写将自动生成"); | |
427 | + registerAccount.addMouseListener(new MouseAdapter() { | |
428 | + @Override | |
429 | + public void mouseClicked(MouseEvent e) { | |
430 | + if (registerAccount.getText().equals("若不填写将自动生成")) { | |
431 | + registerAccount.setForeground(Color.black); | |
432 | + registerAccount.setText(""); | |
433 | + } | |
434 | + } | |
435 | + }); | |
436 | + register.add(registerAccount); | |
437 | + registerAccount.setFont(new Font("微软雅黑", Font.PLAIN, 13)); | |
438 | + registerAccount.setColumns(10); | |
439 | + | |
440 | + | |
441 | + btnNewButton.addActionListener(new ActionListener() { | |
442 | + public void actionPerformed(ActionEvent e) { | |
443 | + String Environment = (String) selectSystem.getSelectedItem(); | |
444 | + String Scene = (String) selectScene.getSelectedItem(); | |
445 | + String Browser = (String) browser.getSelectedItem(); | |
446 | + BrowserEngine.setInit(Environment, Browser); | |
447 | + TestNG testNG = new TestNG(); | |
448 | + List<String> suites = new ArrayList<String>(); | |
449 | + if (Scene == "新增原厂商品") { | |
450 | + AddOriginalGoodsPage.setSupplierName(supplierName.getText()); | |
451 | + UpdatePicPage.setPicPath(picPath.getText()); | |
452 | +// suites.add(".\\suites\\addOriginalGoods.xml"); | |
453 | + suites.add(".\\resources\\suites\\addOriginalGoods.xml");//图形界面 | |
454 | + }else if (Scene == "新增市场商品") { | |
455 | + Model.setBuyerNo(buyerNo2.getText()); | |
456 | + Model.setPicPath(picPath.getText()); | |
457 | + Model.setSupplierName(supplierName.getText()); | |
458 | +// suites.add(".\\suites\\addMarketGoods.xml"); | |
459 | + suites.add(".\\resources\\suites\\addMarketGoods.xml");//图形界面 | |
460 | + } else if (Scene == "发布团购") { | |
461 | + AddOriginalGoodsPage.setSupplierName(supplierName.getText()); | |
462 | + UpdatePicPage.setPicPath(picPath.getText()); | |
463 | +// suites.add(".\\suites\\publishGroupPurchase.xml"); | |
464 | + suites.add(".\\resources\\suites\\publishGroupPurchase.xml");//图形界面 | |
465 | + } else if (Scene == "采购商注册") { | |
466 | +// suites.add(".\\suites\\buyerRegister.xml"); | |
467 | + if (!(registerAccount.getText().equals("") ||registerAccount.getText().equals("若不填写将自动生成"))) { | |
468 | + Model.setEmail(registerAccount.getText()); | |
469 | + } | |
470 | + suites.add(".\\resources\\suites\\buyerRegister.xml");//图形界面 | |
471 | + } else if (Scene == "添加SKU至购物车") { | |
472 | + Model.setBuyerAccount(account.getText()); | |
473 | + Model.setBuyerPassword(password.getText()); | |
474 | + Model.setSkuNo(SkuNo.getText()); | |
475 | + suites.add(".\\resources\\suites\\addSkuToCart.xml");//暂时舍弃 | |
476 | + } else if (Scene == "成品询价") { | |
477 | + Model.setBuyerAccount(account.getText()); | |
478 | + Model.setBuyerPassword(password.getText()); | |
479 | + Model.setSkuNo(SkuNo.getText()); | |
480 | + System.out.println("打印:"+SkuNo);//=============================================== | |
481 | + suites.add(".\\resources\\suites\\productInquiry.xml"); | |
482 | + } else if (Scene == "提交PO") { | |
483 | + Model.setBuyerAccount(account.getText()); | |
484 | + Model.setBuyerPassword(password.getText()); | |
485 | + Model.setSkuNo(SkuNo.getText()); | |
486 | + suites.add(".\\resources\\suites\\sendPO.xml"); | |
487 | + } | |
488 | + testNG.setTestSuites(suites); | |
489 | + testNG.run(); | |
490 | + ja.append(getCurrentTime()+"======="+Scene+"场景,执行完毕!=======\r\n"); | |
491 | + if (Scene == "新增原厂商品" || Scene == "新增市场商品" || Scene == "发布团购") { | |
492 | + no = Model.getSkuNo(); | |
493 | + if (no != null) { | |
494 | + ja.append(getCurrentTime()+"SKU商品编号:"+no+"\r\n"); | |
495 | + }else { | |
496 | + ja.append(getCurrentTime()+"程序执行失败了!\r\n你可查看目录中test-output/index.html的测试报告,或者查看Log中的执行日志检查原因"); | |
497 | + } | |
498 | + }else if (Scene == "采购商注册") { | |
499 | + String code = Model.getInvateCode(); | |
500 | + String email = Model.getEmail(); | |
501 | + if (code !=null && email != null) { | |
502 | + ja.append(getCurrentTime()+"生成的邀请码:"+Model.getInvateCode()+"\r\n"); | |
503 | + ja.append(getCurrentTime()+"新采购商邮箱:"+Model.getEmail()+"\r\n"); | |
504 | + }else { | |
505 | + ja.append(getCurrentTime()+"程序执行失败了!\r\n你可以分析目录中test-output/index.html的测试报告,或者查看目录中Log文件夹生成的执行日志"); | |
506 | + } | |
507 | + }else if (Scene == "添加SKU至购物车") { | |
508 | + ja.append(getCurrentTime()+"所选采购商账号:"+Model.getBuyerAccount()+"\r\n"); | |
509 | + ja.append(getCurrentTime()+"添加的SKU编号为:"+Model.getSkuNo()+"\r\n"); | |
510 | + }else if (Scene == "成品询价") { | |
511 | + ja.append(getCurrentTime()+"采购商账号:"+Model.getBuyerAccount()+"\r\n"); | |
512 | + ja.append(getCurrentTime()+"SKU编号:"+Model.getSkuNo()+"\r\n"); | |
513 | + }else if (Scene == "提交PO") { | |
514 | + ja.append(getCurrentTime()+"采购商账号:"+Model.getBuyerAccount()+"\r\n"); | |
515 | + ja.append(getCurrentTime()+"PO单号:"+Model.getPoNum()+"\r\n"); | |
516 | + } | |
517 | + } | |
518 | + }); | |
519 | + | |
520 | + } | |
521 | +} | ... | ... |
15.6 KB
target/classes/TestConfig/config.properties deleted
... | ... | @@ -1,16 +0,0 @@ |
1 | -#browserName=FireFox | |
2 | -#browserName=IE | |
3 | -browserName=Chrome | |
4 | - | |
5 | -SIT=http://bpms.sit.gz.essa | |
6 | -BSIT=http://en.portalsit.cn | |
7 | - | |
8 | -HOTFIX=http://bpms.hotfix.gz.essa | |
9 | -BHOTFIX=http://en.portalhotfix.cn | |
10 | - | |
11 | -UAT=http://bpms.spstoys.com:7291 | |
12 | -BUAT=http://en.spstoys.com:889 | |
13 | - | |
14 | -DIT=http://bpms.dit.gz.essa | |
15 | -BDIT=http://en.portaldit.cn | |
16 | - |
target/classes/chromedriver.exe deleted
No preview for this file type
target/classes/data.xlsx deleted
No preview for this file type
target/essa-0.0.1-SNAPSHOT.jar deleted
No preview for this file type
target/maven-archiver/pom.properties deleted
target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst deleted
... | ... | @@ -1,14 +0,0 @@ |
1 | -E:\work\essa\src\main\java\com\essa\testSuite\Test_Development_Ability.java | |
2 | -E:\work\essa\src\main\java\com\essa\testSuite\Test_Login.java | |
3 | -E:\work\essa\src\main\java\com\essa\pageObject\LoginPage.java | |
4 | -E:\work\essa\src\main\java\com\essa\framework\BrowserEngine.java | |
5 | -E:\work\essa\src\main\java\com\essa\framework\ListenerSuite.java | |
6 | -E:\work\essa\src\main\java\com\essa\framework\LogType.java | |
7 | -E:\work\essa\src\main\java\com\essa\pageObject\SupplierOperationsTrackPage.java | |
8 | -E:\work\essa\src\main\java\com\essa\pageObject\SupplierStrengthPage.java | |
9 | -E:\work\essa\src\main\java\com\essa\framework\BasePage.java | |
10 | -E:\work\essa\src\main\java\com\essa\testSuite\SendEmail.java | |
11 | -E:\work\essa\src\main\java\com\essa\framework\SendEmail.java | |
12 | -E:\work\essa\src\main\java\com\essa\pageObject\BaseTest.java | |
13 | -E:\work\essa\src\main\java\com\essa\pageObject\HomePage.java | |
14 | -E:\work\essa\src\main\java\com\essa\framework\Logger.java |
target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst renamed to target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
target/surefire-reports/TEST-TestSuite.xml deleted
... | ... | @@ -1,67 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8" ?> | |
2 | -<testsuite tests="2" failures="0" name="TestSuite" time="48.905" errors="0" skipped="0"> | |
3 | - <properties> | |
4 | - <property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/> | |
5 | - <property name="sun.boot.library.path" value="C:\Java\jdk1.8.0_144\jre\bin"/> | |
6 | - <property name="java.vm.version" value="25.144-b01"/> | |
7 | - <property name="java.vm.vendor" value="Oracle Corporation"/> | |
8 | - <property name="java.vendor.url" value="http://java.oracle.com/"/> | |
9 | - <property name="path.separator" value=";"/> | |
10 | - <property name="java.vm.name" value="Java HotSpot(TM) Client VM"/> | |
11 | - <property name="file.encoding.pkg" value="sun.io"/> | |
12 | - <property name="user.script" value=""/> | |
13 | - <property name="user.country" value="CN"/> | |
14 | - <property name="sun.java.launcher" value="SUN_STANDARD"/> | |
15 | - <property name="sun.os.patch.level" value=""/> | |
16 | - <property name="java.vm.specification.name" value="Java Virtual Machine Specification"/> | |
17 | - <property name="user.dir" value="E:\work\essa"/> | |
18 | - <property name="java.runtime.version" value="1.8.0_144-b01"/> | |
19 | - <property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/> | |
20 | - <property name="basedir" value="E:\work\essa"/> | |
21 | - <property name="java.endorsed.dirs" value="C:\Java\jdk1.8.0_144\jre\lib\endorsed"/> | |
22 | - <property name="os.arch" value="x86"/> | |
23 | - <property name="surefire.real.class.path" value="E:\work\essa\target\surefire\surefirebooter8959233717724126040.jar"/> | |
24 | - <property name="java.io.tmpdir" value="C:\Users\jin\AppData\Local\Temp\"/> | |
25 | - <property name="line.separator" value=" | |
26 | -"/> | |
27 | - <property name="java.vm.specification.vendor" value="Oracle Corporation"/> | |
28 | - <property name="user.variant" value=""/> | |
29 | - <property name="os.name" value="Windows 10"/> | |
30 | - <property name="sun.jnu.encoding" value="GBK"/> | |
31 | - <property name="java.library.path" value="C:\Java\jdk1.8.0_144\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\apache-maven-3.5.3/bin;C:\Java\jdk1.8.0_144/bin;C:\Java\jdk1.8.0_144/bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Java\jdk1.8.0_144\bin;C:\Java\jdk1.8.0_144\jre\bin;;."/> | |
32 | - <property name="surefire.test.class.path" value="E:\work\essa\target\test-classes;E:\work\essa\target\classes;C:\Users\jin\.m2\repository\org\testng\testng\6.14.2\testng-6.14.2.jar;C:\Users\jin\.m2\repository\com\beust\jcommander\1.72\jcommander-1.72.jar;C:\Users\jin\.m2\repository\org\apache-extras\beanshell\bsh\2.0b6\bsh-2.0b6.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-java\3.11.0\selenium-java-3.11.0.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-api\3.11.0\selenium-api-3.11.0.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-edge-driver\3.11.0\selenium-edge-driver-3.11.0.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-opera-driver\3.11.0\selenium-opera-driver-3.11.0.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-remote-driver\3.11.0\selenium-remote-driver-3.11.0.jar;C:\Users\jin\.m2\repository\net\bytebuddy\byte-buddy\1.7.9\byte-buddy-1.7.9.jar;C:\Users\jin\.m2\repository\org\apache\commons\commons-exec\1.3\commons-exec-1.3.jar;C:\Users\jin\.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\jin\.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;C:\Users\jin\.m2\repository\com\google\code\gson\gson\2.8.2\gson-2.8.2.jar;C:\Users\jin\.m2\repository\com\google\guava\guava\23.6-jre\guava-23.6-jre.jar;C:\Users\jin\.m2\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;C:\Users\jin\.m2\repository\org\checkerframework\checker-compat-qual\2.0.0\checker-compat-qual-2.0.0.jar;C:\Users\jin\.m2\repository\com\google\errorprone\error_prone_annotations\2.1.3\error_prone_annotations-2.1.3.jar;C:\Users\jin\.m2\repository\com\google\j2objc\j2objc-annotations\1.1\j2objc-annotations-1.1.jar;C:\Users\jin\.m2\repository\org\codehaus\mojo\animal-sniffer-annotations\1.14\animal-sniffer-annotations-1.14.jar;C:\Users\jin\.m2\repository\org\apache\httpcomponents\httpclient\4.5.3\httpclient-4.5.3.jar;C:\Users\jin\.m2\repository\org\apache\httpcomponents\httpcore\4.4.6\httpcore-4.4.6.jar;C:\Users\jin\.m2\repository\com\squareup\okhttp3\okhttp\3.9.1\okhttp-3.9.1.jar;C:\Users\jin\.m2\repository\com\squareup\okio\okio\1.13.0\okio-1.13.0.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-firefox-driver\3.11.0\selenium-firefox-driver-3.11.0.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-chrome-driver\3.11.0\selenium-chrome-driver-3.11.0.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-safari-driver\3.11.0\selenium-safari-driver-3.11.0.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-ie-driver\3.11.0\selenium-ie-driver-3.11.0.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-support\2.46.0\selenium-support-2.46.0.jar;C:\Users\jin\.m2\repository\javax\mail\mail\1.4\mail-1.4.jar;C:\Users\jin\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar;C:\Users\jin\.m2\repository\org\apache\commons\commons-collections4\4.1\commons-collections4-4.1.jar;C:\Users\jin\.m2\repository\org\apache\poi\poi\3.17\poi-3.17.jar;C:\Users\jin\.m2\repository\org\apache\poi\poi-ooxml\3.17\poi-ooxml-3.17.jar;C:\Users\jin\.m2\repository\com\github\virtuald\curvesapi\1.04\curvesapi-1.04.jar;C:\Users\jin\.m2\repository\org\apache\poi\poi-ooxml-schemas\3.17\poi-ooxml-schemas-3.17.jar;C:\Users\jin\.m2\repository\org\apache\xmlbeans\xmlbeans\2.6.0\xmlbeans-2.6.0.jar;C:\Users\jin\.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;C:\Users\jin\.m2\repository\commons-io\commons-io\1.3.2\commons-io-1.3.2.jar;"/> | |
33 | - <property name="java.specification.name" value="Java Platform API Specification"/> | |
34 | - <property name="java.class.version" value="52.0"/> | |
35 | - <property name="sun.management.compiler" value="HotSpot Client Compiler"/> | |
36 | - <property name="os.version" value="10.0"/> | |
37 | - <property name="user.home" value="C:\Users\jin"/> | |
38 | - <property name="user.timezone" value="Asia/Shanghai"/> | |
39 | - <property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/> | |
40 | - <property name="java.specification.version" value="1.8"/> | |
41 | - <property name="file.encoding" value="GBK"/> | |
42 | - <property name="user.name" value="jin"/> | |
43 | - <property name="java.class.path" value="E:\work\essa\target\test-classes;E:\work\essa\target\classes;C:\Users\jin\.m2\repository\org\testng\testng\6.14.2\testng-6.14.2.jar;C:\Users\jin\.m2\repository\com\beust\jcommander\1.72\jcommander-1.72.jar;C:\Users\jin\.m2\repository\org\apache-extras\beanshell\bsh\2.0b6\bsh-2.0b6.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-java\3.11.0\selenium-java-3.11.0.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-api\3.11.0\selenium-api-3.11.0.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-edge-driver\3.11.0\selenium-edge-driver-3.11.0.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-opera-driver\3.11.0\selenium-opera-driver-3.11.0.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-remote-driver\3.11.0\selenium-remote-driver-3.11.0.jar;C:\Users\jin\.m2\repository\net\bytebuddy\byte-buddy\1.7.9\byte-buddy-1.7.9.jar;C:\Users\jin\.m2\repository\org\apache\commons\commons-exec\1.3\commons-exec-1.3.jar;C:\Users\jin\.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\jin\.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;C:\Users\jin\.m2\repository\com\google\code\gson\gson\2.8.2\gson-2.8.2.jar;C:\Users\jin\.m2\repository\com\google\guava\guava\23.6-jre\guava-23.6-jre.jar;C:\Users\jin\.m2\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;C:\Users\jin\.m2\repository\org\checkerframework\checker-compat-qual\2.0.0\checker-compat-qual-2.0.0.jar;C:\Users\jin\.m2\repository\com\google\errorprone\error_prone_annotations\2.1.3\error_prone_annotations-2.1.3.jar;C:\Users\jin\.m2\repository\com\google\j2objc\j2objc-annotations\1.1\j2objc-annotations-1.1.jar;C:\Users\jin\.m2\repository\org\codehaus\mojo\animal-sniffer-annotations\1.14\animal-sniffer-annotations-1.14.jar;C:\Users\jin\.m2\repository\org\apache\httpcomponents\httpclient\4.5.3\httpclient-4.5.3.jar;C:\Users\jin\.m2\repository\org\apache\httpcomponents\httpcore\4.4.6\httpcore-4.4.6.jar;C:\Users\jin\.m2\repository\com\squareup\okhttp3\okhttp\3.9.1\okhttp-3.9.1.jar;C:\Users\jin\.m2\repository\com\squareup\okio\okio\1.13.0\okio-1.13.0.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-firefox-driver\3.11.0\selenium-firefox-driver-3.11.0.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-chrome-driver\3.11.0\selenium-chrome-driver-3.11.0.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-safari-driver\3.11.0\selenium-safari-driver-3.11.0.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-ie-driver\3.11.0\selenium-ie-driver-3.11.0.jar;C:\Users\jin\.m2\repository\org\seleniumhq\selenium\selenium-support\2.46.0\selenium-support-2.46.0.jar;C:\Users\jin\.m2\repository\javax\mail\mail\1.4\mail-1.4.jar;C:\Users\jin\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar;C:\Users\jin\.m2\repository\org\apache\commons\commons-collections4\4.1\commons-collections4-4.1.jar;C:\Users\jin\.m2\repository\org\apache\poi\poi\3.17\poi-3.17.jar;C:\Users\jin\.m2\repository\org\apache\poi\poi-ooxml\3.17\poi-ooxml-3.17.jar;C:\Users\jin\.m2\repository\com\github\virtuald\curvesapi\1.04\curvesapi-1.04.jar;C:\Users\jin\.m2\repository\org\apache\poi\poi-ooxml-schemas\3.17\poi-ooxml-schemas-3.17.jar;C:\Users\jin\.m2\repository\org\apache\xmlbeans\xmlbeans\2.6.0\xmlbeans-2.6.0.jar;C:\Users\jin\.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;C:\Users\jin\.m2\repository\commons-io\commons-io\1.3.2\commons-io-1.3.2.jar;"/> | |
44 | - <property name="java.vm.specification.version" value="1.8"/> | |
45 | - <property name="sun.arch.data.model" value="32"/> | |
46 | - <property name="java.home" value="C:\Java\jdk1.8.0_144\jre"/> | |
47 | - <property name="sun.java.command" value="E:\work\essa\target\surefire\surefirebooter8959233717724126040.jar E:\work\essa\target\surefire\surefire2809287539438424410tmp E:\work\essa\target\surefire\surefire4282035049965679832tmp"/> | |
48 | - <property name="java.specification.vendor" value="Oracle Corporation"/> | |
49 | - <property name="user.language" value="zh"/> | |
50 | - <property name="awt.toolkit" value="sun.awt.windows.WToolkit"/> | |
51 | - <property name="java.vm.info" value="mixed mode"/> | |
52 | - <property name="java.version" value="1.8.0_144"/> | |
53 | - <property name="java.ext.dirs" value="C:\Java\jdk1.8.0_144\jre\lib\ext;C:\Windows\Sun\Java\lib\ext"/> | |
54 | - <property name="sun.boot.class.path" value="C:\Java\jdk1.8.0_144\jre\lib\resources.jar;C:\Java\jdk1.8.0_144\jre\lib\rt.jar;C:\Java\jdk1.8.0_144\jre\lib\sunrsasign.jar;C:\Java\jdk1.8.0_144\jre\lib\jsse.jar;C:\Java\jdk1.8.0_144\jre\lib\jce.jar;C:\Java\jdk1.8.0_144\jre\lib\charsets.jar;C:\Java\jdk1.8.0_144\jre\lib\jfr.jar;C:\Java\jdk1.8.0_144\jre\classes"/> | |
55 | - <property name="webdriver.chrome.driver" value=".\src\main\resources\chromedriver.exe"/> | |
56 | - <property name="java.vendor" value="Oracle Corporation"/> | |
57 | - <property name="localRepository" value="C:\Users\jin\.m2\repository"/> | |
58 | - <property name="file.separator" value="\"/> | |
59 | - <property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/> | |
60 | - <property name="sun.cpu.endian" value="little"/> | |
61 | - <property name="sun.io.unicode.encoding" value="UnicodeLittle"/> | |
62 | - <property name="sun.desktop" value="windows"/> | |
63 | - <property name="sun.cpu.isalist" value=""/> | |
64 | - </properties> | |
65 | - <testcase classname="com.essa.testSuite.Test_Login" name="login" time="8.68"/> | |
66 | - <testcase classname="com.essa.testSuite.Test_Login" name="login" time="10.97"/> | |
67 | -</testsuite> | |
68 | 0 | \ No newline at end of file |
target/surefire-reports/TestSuite.txt deleted
target/surefire-reports/bpms自动化测试/login.xml deleted
... | ... | @@ -1,6 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!-- Generated by org.testng.reporters.JUnitXMLReporter --> | |
3 | -<testsuite hostname="DESKTOP-NIGE62D" ignored="0" name="login" tests="2" failures="0" timestamp="10 四月 2018 10:25:58 GMT" time="44.303" errors="0"> | |
4 | - <testcase name="login" time="8.676" classname="com.essa.testSuite.Test_Login"/> | |
5 | - <testcase name="login" time="10.933" classname="com.essa.testSuite.Test_Login"/> | |
6 | -</testsuite> <!-- login --> |
target/surefire-reports/bpms自动化测试报告/login.xml deleted
... | ... | @@ -1,6 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!-- Generated by org.testng.reporters.JUnitXMLReporter --> | |
3 | -<testsuite hostname="DESKTOP-NIGE62D" ignored="0" name="login" tests="2" failures="0" timestamp="10 四月 2018 10:11:39 GMT" time="22.999" errors="0"> | |
4 | - <testcase name="login" time="5.599" classname="com.essa.testSuite.Test_Login"/> | |
5 | - <testcase name="login" time="5.314" classname="com.essa.testSuite.Test_Login"/> | |
6 | -</testsuite> <!-- login --> |
target/surefire-reports/bpms自动化测试报告/testng-failed.xml deleted
... | ... | @@ -1,18 +0,0 @@ |
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> | |
3 | -<suite guice-stage="DEVELOPMENT" verbose="0" name="Failed suite [bpms自动化测试报告]"> | |
4 | - <listeners> | |
5 | - <listener class-name="com.essa.framework.ListenerSuite"/> | |
6 | - </listeners> | |
7 | - <test thread-count="5" verbose="0" name="login(failed)"> | |
8 | - <classes> | |
9 | - <class name="com.essa.testSuite.Test_Login"> | |
10 | - <methods> | |
11 | - <include name="setUp"/> | |
12 | - <include name="login"/> | |
13 | - <include name="tearDown"/> | |
14 | - </methods> | |
15 | - </class> <!-- com.essa.testSuite.Test_Login --> | |
16 | - </classes> | |
17 | - </test> <!-- login(failed) --> | |
18 | -</suite> <!-- Failed suite [bpms自动化测试报告] --> |
target/surefire-reports/bullet_point.png deleted
356 Bytes
target/surefire-reports/collapseall.gif deleted
157 Bytes
target/surefire-reports/emailable-report.html deleted
... | ... | @@ -1,19 +0,0 @@ |
1 | -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
2 | -<html xmlns="http://www.w3.org/1999/xhtml"> | |
3 | -<head> | |
4 | -<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
5 | -<title>TestNG Report</title> | |
6 | -<style type="text/css">table {margin-bottom:10px;border-collapse:collapse;empty-cells:show}th,td {border:1px solid #009;padding:.25em .5em}th {vertical-align:bottom}td {vertical-align:top}table a {font-weight:bold}.stripe td {background-color: #E6EBF9}.num {text-align:right}.passedodd td {background-color: #3F3}.passedeven td {background-color: #0A0}.skippedodd td {background-color: #DDD}.skippedeven td {background-color: #CCC}.failedodd td,.attn {background-color: #F33}.failedeven td,.stripe .attn {background-color: #D00}.stacktrace {white-space:pre;font-family:monospace}.totop {font-size:85%;text-align:center;border-bottom:2px solid #000}.invisible {display:none}</style> | |
7 | -</head> | |
8 | -<body> | |
9 | -<table> | |
10 | -<tr><th>Test</th><th># Passed</th><th># Skipped</th><th># Failed</th><th>Time (ms)</th><th>Included Groups</th><th>Excluded Groups</th></tr> | |
11 | -<tr><th colspan="7">bpms自动化测试</th></tr> | |
12 | -<tr><td><a href="#t0">login</a></td><td class="num">2</td><td class="num">0</td><td class="num">0</td><td class="num">44,303</td><td></td><td></td></tr> | |
13 | -</table> | |
14 | -<table id='summary'><thead><tr><th>Class</th><th>Method</th><th>Start</th><th>Time (ms)</th></tr></thead><tbody><tr><th colspan="4">bpms自动化测试</th></tr></tbody><tbody id="t0"><tr><th colspan="4">login — passed</th></tr><tr class="passedeven"><td rowspan="2">com.essa.testSuite.Test_Login</td><td><a href="#m0">login</a></td><td rowspan="2">1523355930019</td><td rowspan="2">8676</td></tr><tr class="passedeven"><td><a href="#m1">login</a></td></tr></tbody> | |
15 | -</table> | |
16 | -<h2>login</h2><h3 id="m0">com.essa.testSuite.Test_Login#login</h3><table class="result"><tr class="param"><th>Parameter #1</th><th>Parameter #2</th></tr><tr class="param stripe"><td>admin</td><td>essa123</td></tr></table><p class="totop"><a href="#summary">back to summary</a></p> | |
17 | -<h3 id="m1">com.essa.testSuite.Test_Login#login</h3><table class="result"><tr class="param"><th>Parameter #1</th><th>Parameter #2</th></tr><tr class="param stripe"><td>linrong</td><td>essa123</td></tr></table><p class="totop"><a href="#summary">back to summary</a></p> | |
18 | -</body> | |
19 | -</html> |
target/surefire-reports/failed.png deleted
977 Bytes
target/surefire-reports/index.html deleted
... | ... | @@ -1,265 +0,0 @@ |
1 | -<!DOCTYPE html> | |
2 | - | |
3 | -<html> | |
4 | - <head> | |
5 | - <meta charset='utf-8'> | |
6 | - <title>TestNG reports</title> | |
7 | - | |
8 | - <link type="text/css" href="testng-reports.css" rel="stylesheet" /> | |
9 | - <script type="text/javascript" src="jquery-1.7.1.min.js"></script> | |
10 | - <script type="text/javascript" src="testng-reports.js"></script> | |
11 | - <script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
12 | - <script type='text/javascript'> | |
13 | - google.load('visualization', '1', {packages:['table']}); | |
14 | - google.setOnLoadCallback(drawTable); | |
15 | - var suiteTableInitFunctions = new Array(); | |
16 | - var suiteTableData = new Array(); | |
17 | - </script> | |
18 | - <!-- | |
19 | - <script type="text/javascript" src="jquery-ui/js/jquery-ui-1.8.16.custom.min.js"></script> | |
20 | - --> | |
21 | - </head> | |
22 | - | |
23 | - <body> | |
24 | - <div class="top-banner-root"> | |
25 | - <span class="top-banner-title-font">Test results</span> | |
26 | - <br/> | |
27 | - <span class="top-banner-font-1">1 suite</span> | |
28 | - </div> <!-- top-banner-root --> | |
29 | - <div class="navigator-root"> | |
30 | - <div class="navigator-suite-header"> | |
31 | - <span>All suites</span> | |
32 | - <a href="#" class="collapse-all-link" title="Collapse/expand all the suites"> | |
33 | - <img class="collapse-all-icon" src="collapseall.gif"> | |
34 | - </img> <!-- collapse-all-icon --> | |
35 | - </a> <!-- collapse-all-link --> | |
36 | - </div> <!-- navigator-suite-header --> | |
37 | - <div class="suite"> | |
38 | - <div class="rounded-window"> | |
39 | - <div class="suite-header light-rounded-window-top"> | |
40 | - <a href="#" class="navigator-link" panel-name="suite-bpms自动化测试"> | |
41 | - <span class="suite-name border-passed">bpms自动化测试</span> | |
42 | - </a> <!-- navigator-link --> | |
43 | - </div> <!-- suite-header light-rounded-window-top --> | |
44 | - <div class="navigator-suite-content"> | |
45 | - <div class="suite-section-title"> | |
46 | - <span>Info</span> | |
47 | - </div> <!-- suite-section-title --> | |
48 | - <div class="suite-section-content"> | |
49 | - <ul> | |
50 | - <li> | |
51 | - <a href="#" class="navigator-link " panel-name="test-xml-bpms自动化测试"> | |
52 | - <span>E:\work\essa\suites\testng.xml</span> | |
53 | - </a> <!-- navigator-link --> | |
54 | - </li> | |
55 | - <li> | |
56 | - <a href="#" class="navigator-link " panel-name="testlist-bpms自动化测试"> | |
57 | - <span class="test-stats">1 test</span> | |
58 | - </a> <!-- navigator-link --> | |
59 | - </li> | |
60 | - <li> | |
61 | - <a href="#" class="navigator-link " panel-name="group-bpms自动化测试"> | |
62 | - <span>0 groups</span> | |
63 | - </a> <!-- navigator-link --> | |
64 | - </li> | |
65 | - <li> | |
66 | - <a href="#" class="navigator-link " panel-name="times-bpms自动化测试"> | |
67 | - <span>Times</span> | |
68 | - </a> <!-- navigator-link --> | |
69 | - </li> | |
70 | - <li> | |
71 | - <a href="#" class="navigator-link " panel-name="reporter-bpms自动化测试"> | |
72 | - <span>Reporter output</span> | |
73 | - </a> <!-- navigator-link --> | |
74 | - </li> | |
75 | - <li> | |
76 | - <a href="#" class="navigator-link " panel-name="ignored-methods-bpms自动化测试"> | |
77 | - <span>Ignored methods</span> | |
78 | - </a> <!-- navigator-link --> | |
79 | - </li> | |
80 | - <li> | |
81 | - <a href="#" class="navigator-link " panel-name="chronological-bpms自动化测试"> | |
82 | - <span>Chronological view</span> | |
83 | - </a> <!-- navigator-link --> | |
84 | - </li> | |
85 | - </ul> | |
86 | - </div> <!-- suite-section-content --> | |
87 | - <div class="result-section"> | |
88 | - <div class="suite-section-title"> | |
89 | - <span>Results</span> | |
90 | - </div> <!-- suite-section-title --> | |
91 | - <div class="suite-section-content"> | |
92 | - <ul> | |
93 | - <li> | |
94 | - <span class="method-stats">2 methods, 2 passed</span> | |
95 | - </li> | |
96 | - <li> | |
97 | - <span class="method-list-title passed">Passed methods</span> | |
98 | - <span class="show-or-hide-methods passed"> | |
99 | - <a href="#" panel-name="suite-bpms自动化测试" class="hide-methods passed suite-bpms自动化测试"> (hide)</a> <!-- hide-methods passed suite-bpms自动化测试 --> | |
100 | - <a href="#" panel-name="suite-bpms自动化测试" class="show-methods passed suite-bpms自动化测试"> (show)</a> <!-- show-methods passed suite-bpms自动化测试 --> | |
101 | - </span> | |
102 | - <div class="method-list-content passed suite-bpms自动化测试"> | |
103 | - <span> | |
104 | - <img width="3%" src="passed.png"/> | |
105 | - <a href="#" class="method navigator-link" panel-name="suite-bpms自动化测试" title="com.essa.testSuite.Test_Login" hash-for-method="login(admin, essa123)">login(admin, essa123)</a> <!-- method navigator-link --> | |
106 | - </span> | |
107 | - <br/> | |
108 | - <span> | |
109 | - <img width="3%" src="passed.png"/> | |
110 | - <a href="#" class="method navigator-link" panel-name="suite-bpms自动化测试" title="com.essa.testSuite.Test_Login" hash-for-method="login(linrong, essa123)">login(linrong, essa123)</a> <!-- method navigator-link --> | |
111 | - </span> | |
112 | - <br/> | |
113 | - </div> <!-- method-list-content passed suite-bpms自动化测试 --> | |
114 | - </li> | |
115 | - </ul> | |
116 | - </div> <!-- suite-section-content --> | |
117 | - </div> <!-- result-section --> | |
118 | - </div> <!-- navigator-suite-content --> | |
119 | - </div> <!-- rounded-window --> | |
120 | - </div> <!-- suite --> | |
121 | - </div> <!-- navigator-root --> | |
122 | - <div class="wrapper"> | |
123 | - <div class="main-panel-root"> | |
124 | - <div panel-name="suite-bpms自动化测试" class="panel bpms自动化测试"> | |
125 | - <div class="suite-bpms自动化测试-class-passed"> | |
126 | - <div class="main-panel-header rounded-window-top"> | |
127 | - <img src="passed.png"/> | |
128 | - <span class="class-name">com.essa.testSuite.Test_Login</span> | |
129 | - </div> <!-- main-panel-header rounded-window-top --> | |
130 | - <div class="main-panel-content rounded-window-bottom"> | |
131 | - <div class="method"> | |
132 | - <div class="method-content"> | |
133 | - <a name="login(admin, essa123)"> | |
134 | - </a> <!-- login(admin, essa123) --> | |
135 | - <span class="method-name">login</span> | |
136 | - <span class="parameters">(admin, essa123)</span> | |
137 | - </div> <!-- method-content --> | |
138 | - </div> <!-- method --> | |
139 | - <div class="method"> | |
140 | - <div class="method-content"> | |
141 | - <a name="login(linrong, essa123)"> | |
142 | - </a> <!-- login(linrong, essa123) --> | |
143 | - <span class="method-name">login</span> | |
144 | - <span class="parameters">(linrong, essa123)</span> | |
145 | - </div> <!-- method-content --> | |
146 | - </div> <!-- method --> | |
147 | - </div> <!-- main-panel-content rounded-window-bottom --> | |
148 | - </div> <!-- suite-bpms自动化测试-class-passed --> | |
149 | - </div> <!-- panel bpms自动化测试 --> | |
150 | - <div panel-name="test-xml-bpms自动化测试" class="panel"> | |
151 | - <div class="main-panel-header rounded-window-top"> | |
152 | - <span class="header-content">E:\work\essa\suites\testng.xml</span> | |
153 | - </div> <!-- main-panel-header rounded-window-top --> | |
154 | - <div class="main-panel-content rounded-window-bottom"> | |
155 | - <pre> | |
156 | -<?xml version="1.0" encoding="UTF-8"?> | |
157 | -<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> | |
158 | -<suite guice-stage="DEVELOPMENT" verbose="0" name="bpms自动化测试"> | |
159 | - <listeners> | |
160 | - <listener class-name="com.essa.framework.ListenerSuite"/> | |
161 | - </listeners> | |
162 | - <test thread-count="5" verbose="0" name="login"> | |
163 | - <classes> | |
164 | - <class name="com.essa.testSuite.Test_Login"/> | |
165 | - </classes> | |
166 | - </test> <!-- login --> | |
167 | -</suite> <!-- bpms自动化测试 --> | |
168 | - </pre> | |
169 | - </div> <!-- main-panel-content rounded-window-bottom --> | |
170 | - </div> <!-- panel --> | |
171 | - <div panel-name="testlist-bpms自动化测试" class="panel"> | |
172 | - <div class="main-panel-header rounded-window-top"> | |
173 | - <span class="header-content">Tests for bpms自动化测试</span> | |
174 | - </div> <!-- main-panel-header rounded-window-top --> | |
175 | - <div class="main-panel-content rounded-window-bottom"> | |
176 | - <ul> | |
177 | - <li> | |
178 | - <span class="test-name">login (1 class)</span> | |
179 | - </li> | |
180 | - </ul> | |
181 | - </div> <!-- main-panel-content rounded-window-bottom --> | |
182 | - </div> <!-- panel --> | |
183 | - <div panel-name="group-bpms自动化测试" class="panel"> | |
184 | - <div class="main-panel-header rounded-window-top"> | |
185 | - <span class="header-content">Groups for bpms自动化测试</span> | |
186 | - </div> <!-- main-panel-header rounded-window-top --> | |
187 | - <div class="main-panel-content rounded-window-bottom"> | |
188 | - </div> <!-- main-panel-content rounded-window-bottom --> | |
189 | - </div> <!-- panel --> | |
190 | - <div panel-name="times-bpms自动化测试" class="panel"> | |
191 | - <div class="main-panel-header rounded-window-top"> | |
192 | - <span class="header-content">Times for bpms自动化测试</span> | |
193 | - </div> <!-- main-panel-header rounded-window-top --> | |
194 | - <div class="main-panel-content rounded-window-bottom"> | |
195 | - <div class="times-div"> | |
196 | - <script type="text/javascript"> | |
197 | -suiteTableInitFunctions.push('tableData_bpms自动化测试'); | |
198 | -function tableData_bpms自动化测试() { | |
199 | -var data = new google.visualization.DataTable(); | |
200 | -data.addColumn('number', 'Number'); | |
201 | -data.addColumn('string', 'Method'); | |
202 | -data.addColumn('string', 'Class'); | |
203 | -data.addColumn('number', 'Time (ms)'); | |
204 | -data.addRows(2); | |
205 | -data.setCell(0, 0, 0) | |
206 | -data.setCell(0, 1, 'login') | |
207 | -data.setCell(0, 2, 'com.essa.testSuite.Test_Login') | |
208 | -data.setCell(0, 3, 10933); | |
209 | -data.setCell(1, 0, 1) | |
210 | -data.setCell(1, 1, 'login') | |
211 | -data.setCell(1, 2, 'com.essa.testSuite.Test_Login') | |
212 | -data.setCell(1, 3, 8676); | |
213 | -window.suiteTableData['bpms自动化测试']= { tableData: data, tableDiv: 'times-div-bpms自动化测试'} | |
214 | -return data; | |
215 | -} | |
216 | - </script> | |
217 | - <span class="suite-total-time">Total running time: 19 seconds</span> | |
218 | - <div id="times-div-bpms自动化测试"> | |
219 | - </div> <!-- times-div-bpms自动化测试 --> | |
220 | - </div> <!-- times-div --> | |
221 | - </div> <!-- main-panel-content rounded-window-bottom --> | |
222 | - </div> <!-- panel --> | |
223 | - <div panel-name="reporter-bpms自动化测试" class="panel"> | |
224 | - <div class="main-panel-header rounded-window-top"> | |
225 | - <span class="header-content">Reporter output for bpms自动化测试</span> | |
226 | - </div> <!-- main-panel-header rounded-window-top --> | |
227 | - <div class="main-panel-content rounded-window-bottom"> | |
228 | - </div> <!-- main-panel-content rounded-window-bottom --> | |
229 | - </div> <!-- panel --> | |
230 | - <div panel-name="ignored-methods-bpms自动化测试" class="panel"> | |
231 | - <div class="main-panel-header rounded-window-top"> | |
232 | - <span class="header-content">0 ignored methods</span> | |
233 | - </div> <!-- main-panel-header rounded-window-top --> | |
234 | - <div class="main-panel-content rounded-window-bottom"> | |
235 | - </div> <!-- main-panel-content rounded-window-bottom --> | |
236 | - </div> <!-- panel --> | |
237 | - <div panel-name="chronological-bpms自动化测试" class="panel"> | |
238 | - <div class="main-panel-header rounded-window-top"> | |
239 | - <span class="header-content">Methods in chronological order</span> | |
240 | - </div> <!-- main-panel-header rounded-window-top --> | |
241 | - <div class="main-panel-content rounded-window-bottom"> | |
242 | - <div class="chronological-class"> | |
243 | - <div class="chronological-class-name">com.essa.testSuite.Test_Login</div> <!-- chronological-class-name --> | |
244 | - <div class="configuration-class before"> | |
245 | - <span class="method-name">setUp</span> | |
246 | - <span class="method-start">0 ms</span> | |
247 | - </div> <!-- configuration-class before --> | |
248 | - <div class="test-method"> | |
249 | - <span class="method-name">login(admin, essa123)</span> | |
250 | - <span class="method-start">16192 ms</span> | |
251 | - </div> <!-- test-method --> | |
252 | - <div class="test-method"> | |
253 | - <span class="method-name">login(linrong, essa123)</span> | |
254 | - <span class="method-start">24877 ms</span> | |
255 | - </div> <!-- test-method --> | |
256 | - <div class="configuration-class after"> | |
257 | - <span class="method-name">tearDown</span> | |
258 | - <span class="method-start">35848 ms</span> | |
259 | - </div> <!-- configuration-class after --> | |
260 | - </div> <!-- main-panel-content rounded-window-bottom --> | |
261 | - </div> <!-- panel --> | |
262 | - </div> <!-- main-panel-root --> | |
263 | - </div> <!-- wrapper --> | |
264 | - </body> | |
265 | -</html> |