Reputation: 1
I have a test that sometimes gets run with the command line flag --disable-multiple-windows
and sometimes it doesn't. I would like the test to skip over a section if multiple windows are disabled. Is there an easy way to tell that within a test?
My best solution so far is something like the following
let disableMultipleWindows=true;
try{
await t.openWindow('www.google.com');
disableMultipleWindows=false
await t.closeWindow();
}
But I'm wondering if there's a better way.
Upvotes: 0
Views: 103
Reputation: 76
At present, disabling support for multiple browser windows is possible only for tests run scenarios. There is no access to the --disable-multiple-windows
option within a test body. You can learn more about this option at Disable Support for Multiple Windows.
Could you please clarify your scenario of using the --disable-multiple-windows
option? I think you can split your tests into different tests suites: with/without multiple browser windows.
Upvotes: 1