broken my chaining test with waitForVisible()
See original GitHub issueI need access input element in spectron test. and need fix broken my test.
Why nothing to basic element test example? (I know WebDriver test example not working in spectron.
- synchronous code not runnable in spectron.
- need replace
$(ID)
->this.app.client.$$(ID)
)
(stackoverflow codes is old and not working…)
I use code of test to test: (write to input elemet, and read from input element.)
it("input basic test", function() {
return this.app.client.waitForVisible('#query-area__query-input__input')
.waitForEnabled('#query-area__query-input__input')
.clearElement('#query-area__query-input__input')
.setValue('#query-area__query-input__input', "Bonan matenon!")
.getValue('#query-area__query-input__input')
.then(function(text){assert(text === 'Bonan matenon!')})
})
in https://github.com/MichinariNukazawa/lina_dicto/blob/master/lina_dicto/test/input_ui.js
upon error when npm update.
spectron: 11.0.0 -> 11.1.0, electron: 9.0.4 -> 9.1.1
error: TypeError: this.app.client.waitForVisible is not a function
because from waitForVisible() is deprecated (?). https://stackoverflow.com/questions/59949831/non-of-the-webdriverio-methods-work-to-wait-until-an-element-is-shown-using-appi Okay I do use waitForDisplayed.
but simple replace is not working.
- return this.app.client.waitForVisible('#query-area__query-input__input')
+ return this.app.client.waitForDisplayed('#query-area__query-input__input')
error: TypeError: this.app.client.waitForDisplayed is not a function
waitForDisplayed() and isDisplayed() are not functions of this.app.client https://github.com/electron-userland/spectron/issues/355
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top GitHub Comments
Success able call waitForDisplayed(). Thanks!
Same