Opening browser from BeforeFeature hook causes 'Unable to find the object Sys.Browser("*")' error
Hi all,
I have 2 feature files, with multiple scenarios inside them. I am opening the browser using the following function below:
function OpenBrowser() {
Log.AppendFolder("Open browser for the test.") ;
Browsers.Item(btChrome).RunOptions = "--no-first-run";
Browsers.Item(btChrome).Run();
Sys.Browser().BrowserWindow(0).Maximize();
}
I'm calling this function from a BeforeFeature hook, on a remote Windows machine. It seems to cause a 'Unable to find the object Sys.Browser("*")' error for each test. In the video recorded for each, it just seems Chrome doesn't open. However, if I call this function from a BeforeScenario hook, it runs fine.
The above problem doesn't seem to happen when I run the test on my local machine. Do you know why this is happening only on the remote machine?
Thanks!
a_welch (Staff) [06/22/2023 - 13:09 ET]
Hi Thien, thanks for reaching out. Arrays of file are not supported at this time. Here is a link to our documentation that may assist. https://docs.stoplight.io/docs/platform/c2f20944173d7-work-with-media-types#work-with-multipart-and-form-requests