You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create a test that contains an after each to clean the instance using t.navigateTo() or a test to go to an inexistent product in the swag labs testing site as a learning path.
The navigateTo() function will hang the test in chromium type browsers, forcing the test and runtime to fail.
If runned in firefox, the test will succeed without any issues.
What is the Current behavior?
Chromium browsers
Test run smoothly until it hits the t.navigateTo(url).
Testcafe navigates to the specified url however after that it hangs until the timeout is reached and it retries 2 more times, failing on all of them and the terminal returns:
\TestCafe> npm run test:firefox
> testcafephptravels@1.0.0 test:firefox
> testcafe edge ./tests -s takeOnFails=true
Running tests in:
- Microsoft Edge 122.0.0.0 / Windows 11
checkout test
[percy] Percy is not running, disabling snapshots
1/1 failed (6m 23s)
ERROR The Microsoft Edge 122.0.0.0 / Windows 11 browser disconnected. If you did not close the browser yourself, browser performance or network issues may be at fault.
Non-chromium browsers -> firefox
Test to run smoothly,
When it reaches the t.navigateTo(url) to perform it, see that it was succeeded and go to the next commands/method calls
What is the Expected behavior?
Test to run smoothly,
When it reaches the t.navigateTo(url) to perform it, see that it was succeeded and go to the next commands/method calls
What is the public URL of the test page? (attach your complete example)
It is similar to the following issue and is caused by 'service worker': #8123.
As a workaround, you can run your test as follows:
import { Selector, Role } from 'testcafe';
const role = Role('https://www.saucedemo.com/', async t => {
await t
.typeText(Selector('[data-test="username"]'), 'standard_user')
.typeText(Selector('#password'), 'secret_sauce')
.click(Selector('#login-button'))
What is your Scenario?
I am trying to create a test that contains an after each to clean the instance using t.navigateTo() or a test to go to an inexistent product in the swag labs testing site as a learning path.
The navigateTo() function will hang the test in chromium type browsers, forcing the test and runtime to fail.
If runned in firefox, the test will succeed without any issues.
What is the Current behavior?
Chromium browsers
Test run smoothly until it hits the t.navigateTo(url).
Testcafe navigates to the specified url however after that it hangs until the timeout is reached and it retries 2 more times, failing on all of them and the terminal returns:
Non-chromium browsers -> firefox
Test to run smoothly,
When it reaches the t.navigateTo(url) to perform it, see that it was succeeded and go to the next commands/method calls
What is the Expected behavior?
Test to run smoothly,
When it reaches the t.navigateTo(url) to perform it, see that it was succeeded and go to the next commands/method calls
What is the public URL of the test page? (attach your complete example)
https://www.saucedemo.com/
What is your TestCafe test code?
Your complete configuration file
{
"screenshots": {
"path":"./screenshots",
"pathPatternOnFails": "fails/${DATE}_${TIME}/${FIXTURE}.png"
}
}
Your complete test report
Screenshots
Steps to Reproduce
TestCafe version
3.5.0
Node.js version
v20.9.0
Command-line arguments
testcafe chrome ./tests -s takeOnFails=true
Browser name(s) and version(s)
Edge & Chrome 122.0.0.0 ; Firefox 123.0
Platform(s) and version(s)
Windows 11 22H2 build: 22621.3155
Other
No response
The text was updated successfully, but these errors were encountered: