Need for browser Resizing:
I was doing truclient protocol based scripting for one of the applications developed on WebSwings. So the entire webpage was considered as one single element or object and all the clicks made on that page were being recorded using their X & Y coordinates.
The issue was that browser size varied between Developer and Load modes and identifying the objects using X & Y coordinates failed.
The solution is to make the browser size same in both the modes for which Browser Resize step comes handy.
How to do browser Resizing:
In Development mode, before recording we need to add the first step as Browser Resize and set the browser to our desired size.
Step 1: Goto Toolbox --> Functions --> Generic Browser Action and by default it will be Navigate step.
Step 2: Expand the Navigate step Goto Step --> Action and change the Action from Navigate to Resize.
Step 3: Now click on the Width or on the Height and set the Width and Height to the desired px value. In my case I have set Width to 800px and Height to 600px.
Step 4: Now record all your flow steps after the Resize step.
Thats it, now when you run the script in Development mode first the browser will be set to the desired Width & Height and then the steps will be executed.
Now lets see how to set the Browser width and Height in Load mode.
Step 1: Disable the Resize step in Development mode and save it.
Step 2: Goto RunTimeSettings --> Others --> Non Interactive Window Size.
Step 3: Check both the options and set the Width to 800px and Height to 600px and save the script.
Thats it. Now browser will be set to the desired size in load mode as well.
Since we have done Browser Resizing identifying the objects using X & Y coordinates will no more fail.