@winning-test/component 0.0.26 → 0.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@winning-test/component",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "description": "",
5
5
  "main": "",
6
6
  "scripts": {
@@ -13,7 +13,7 @@
13
13
  "author": "",
14
14
  "license": "ISC",
15
15
  "dependencies": {
16
- "@winning-test/autotest-webui": "^0.1.40"
16
+ "@winning-test/autotest-webui": "^0.1.42"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/jest": "^29.5.1",
@@ -0,0 +1,31 @@
1
+ /**
2
+ * 列表页面类
3
+ */
4
+ class ListPage extends require("./Page") {
5
+
6
+ /**
7
+ * 列表页面
8
+ * @param {Browser} browser 浏览器
9
+ */
10
+ constructor(browser) {
11
+ super(browser);
12
+ }
13
+
14
+ tableComponent() {
15
+ class TableComponent extends require("../component/TableComponent") {
16
+ _createXpath() {
17
+ return "//*[@class='datagrid-view2']";
18
+ }
19
+ _createHeaderXapth() {
20
+ return "//*[@class='datagrid-header']";
21
+ }
22
+ _createBodyXapth() {
23
+ return "//*[@class='datagrid-body']";
24
+ }
25
+ }
26
+ return new TableComponent(this.browser);
27
+ }
28
+
29
+ }
30
+
31
+ module.exports = ListPage;
@@ -18,7 +18,7 @@ const TopMenuComponent = require("../component/TopMenuComponent");
18
18
  class Page extends require("@winning-test/autotest-webui").Page {
19
19
 
20
20
  /**
21
- * 页面类
21
+ * 页面
22
22
  * @param {Browser} browser 浏览器
23
23
  */
24
24
  constructor(browser) {