Silk Test Workbench return height and width of browser window
How to return the height and width of the browser window?
Using the offsetHeight and offsetWidth properties it is possible to return the height and width similar to that of the BrowserWindow as follows.
Using the IE Developer Tools (Tool > F12 developer tools). Select the BrowserWindow element. Notice the Layout is 1008px x 646px.
In the Workbench Options > Record > xBrowser, add the following to “Custom attributes”: offsetHeight, offsetWidth
Use the Workbench Identify tool to identify the BrowserWindow.
In the locator properties you will see offsetHeight: 676, and offsetWidth: 1008 which matches the IE Developer Tools layout.