在创建夜班测试时,我使用了waitForAttribute()
,它适用于nightwatch@0.9.0。但是当我尝试升级到nightwatch@1.0.6时,它会出现以下错误:
An error occurred while running .getAttribute() command on <.csselement>: TypeError: _this2.client.assertion is not a function
at /node_modules/nightwatch-custom-commands-assertions/js/commands/waitForAttribute.js:100:19
at NightwatchAPI.<anonymous> (.../node_modules/nightwatch-custom-commands-assertions/js/commands/waitForAttribute.js:117:13)
at transport.locateElement.then.then.result (../node_modules/nightwatch/lib/api-loader/element-command.js:107:23)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)