Closed Thomas-Haider closed 1 year ago
Further, prove to my workaround:
When I add a debugger;
in the if that checks if the window property is undefined, i see the following following variables assigned:
Duplicate of https://github.com/DevExpress/testcafe/issues/7886
Thanks!
What is your Scenario?
We have a platform application, where we load apps in iframes of the main iframes. Sadly, when we enabled native automation mode, we have this situation where the window property in the backup.ts file is undefined.
What is the Current behavior?
Following error gets thrown when the page gets loaded initially:
What is the Expected behavior?
I wouldn't expect any issues when opening our platform when native automation mode is enabled.
What is your public website URL? (or attach your complete example)
Can't share and sadly, i did not manage to reproduce this outside of our environement
What is your TestCafe test code?
Can't share details but it is just logging in into our SSO screen and then expecting true to equals false :D
Your complete configuration file
native automation mode is enabled by default
Your complete test report
application throws error in react boundary and therfore the test fails as it obviously can't find the intended selectors
Screenshots
No response
Steps to Reproduce
Unable to reproduce the issue outside our environment
TestCafe version
3.1.0
Node.js version
16.18.1
Command-line arguments
testcafe chrome test.tc-spec.ts --live
Browser name(s) and version(s)
Chrome 115.0.0.0 / Ventura 13
Platform(s) and version(s)
macOS
Other
I manage to workaround this issue by checking if the passed down window property is undefined and if it is undefined I assigne the
window = this
. In this casethis
holds the window property.My proposal for fixing the issue would be the following: https://github.com/DevExpress/testcafe-hammerhead/blob/e7bc19fd181f73ccf615d3e79985b9187f2c7e8d/src/client/sandbox/backup.ts#L45
add the following code at the beginning of the method:
so the function would look like this:
With this changes i do not have any issues and therefore I would be greatful if you guys could introduce them :) ,