@winning-test/component 0.0.113 → 0.0.114

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.113",
3
+ "version": "0.0.114",
4
4
  "description": "",
5
5
  "main": "",
6
6
  "scripts": {
@@ -88,6 +88,22 @@ class Component extends require("../../../autotest-webui/src/Component") {
88
88
  }
89
89
  }
90
90
  }
91
+
92
+ async waitUntilValueNotTheValue(theValue ='', count = 20) {
93
+ while (count > 0) {
94
+ const value = await this.getValue();
95
+ if (value === theValue) {
96
+ return value;
97
+ } else {
98
+ if (count > 1) {
99
+ count--;
100
+ await this.browser.sleep(500);
101
+ } else {
102
+ throw new Error('等待出现特定value失败');
103
+ }
104
+ }
105
+ }
106
+ }
91
107
  }
92
108
 
93
109
  module.exports = Component;