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
Describe the bug
When using assert.fail(); inside the callback of a alert() the browser closes
To Reproduce
Steps (or script) to reproduce the behavior:
Go to '...'
Click on '....'
Scroll down to '....'
See error
const{
openBrowser,
closeBrowser,
goto,
alert,
click,
accept
}=require('taiko');constassert=require('assert');awaitopenBrowser();awaitgoto("https://testpages.herokuapp.com/styled/alerts/alert-test.html");alert("I am an alert box!",async()=>{awaitaccept();assert.fail();});awaitclick("Show alert box");awaitcloseBrowser();
AssertionError [ERR_ASSERTION]: Failed
at c:\gauge-test-popUp\tests\step_implementation.js:28:16
at async EventEmitter.<anonymous> (c:\gauge-test-popUp\node_modules\taiko\lib\taiko.js:2541:5) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: undefined,
expected: undefined,
operator: 'fail'
}
Waiting for the debugger to disconnect...
Failed Step: test step
Specification: c:\gauge-test-popUp\specs\example.spec:5
Error Message: error reading from server: read tcp 127.0.0.1:58501->127.0.0.1:58500: wsarecv: An existing connection was forcibly closed by the remote host.
Stacktrace:
Error Message: Runner is not Alive
Stacktrace:
Error Message: Runner is not Alive
Stacktrace:
Error Message: Runner is not Alive
Stacktrace:
Error Message: Runner is not Alive
Stacktrace:
Expected behavior
the test should fail but the browser should not close
Describe the bug
When using assert.fail(); inside the callback of a alert() the browser closes
To Reproduce
Steps (or script) to reproduce the behavior:
Expected behavior
the test should fail but the browser should not close
Versions:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: