question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

broken my chaining test with waitForVisible()

See original GitHub issue

I 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:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
MichinariNukazawacommented, Aug 5, 2020

Success able call waitForDisplayed(). Thanks!

1reaction
xasophenocommented, Jul 27, 2020

Same

Read more comments on GitHub >

github_iconTop Results From Across the Web

webdriverio/webdriverio - Gitter
Hi guys, i'm getting hanged by the click() function when testing on a selenium grid, what could cause that ? I'm currently just ......
Read more >
WebdriverIO supports Chaining without multiple awaits
This article explains how WebdriverIO v7.9 supports Chaining without Multiple await statements with examples.
Read more >
Best Practices of Cypress/Test Automation framework
Please check the list of best practices below: 1. Unwanted waits. 2. Chaining Assertions. 3. Global baseurl setup. 4. Environment URL config.
Read more >
How can you avoid redundant call while waiting for element ...
waitForVisible() , waitForText() , or more importantly . ... you should always wrap your commands (e.g.: .click() ) into a .
Read more >
WaitForVisible - Selenium IDE command - UI Vision
The waitForVisible tells the IDE to wait for an element to exist and be visible. ... Another option to check for visibility are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found