Search This Blog

Sunday, May 25, 2014

SWDPage Recorder- generate Page Object Sourcecode

SWD Page Recorder is a tool which is used to record the UI elements in a web Page and provides the element identifier source code in the form of a page object model.

Another advantage is it helps in identifying UI elemnts within iFrame and automatically detects iFrame and windows.

It can be downloaded from : -http://swd-tools.com/

Once it has been downloaded , extracting on the same folder will give us an executable file i.e SwdPageRecorder.exe.

Now,Double clicking on it will pop up the tool : -

 

 Producing Page Object Code

If you see most of the options are disabled because it works on steps by steps manner.

(1) Open Browser : - It has a very easy and user friendly UI where you can easily select the browser options from 'Browser' dropdown as described shown below : -
  • Select the browser value from browser dropdown under browser setting tab
  • Click on Start


As soon as you click on Start, it will pop up the browser.

(2) Define URL to navigate-Now you must have noticed the URL field to be disabled before the browser open, but it must have been highlighted now.



Specify the site URL and click on Go.

(3) To record UI elements in the window,follow below process : -

-Navigate to locators Tab and click on start button of web element explorer section





 -Once it started, Stop button will appear, this option provides an in browser web element explorer pop up which help in identifying element.






 -Now Navigate to the browser window and click on user name field and hit Ctrl+Right Click,You will be able to see the explorer window as shown below : -




 -Now Specify the element name under code identifier field and click on Add Element.




 -Now In the page Recorder tool, Navigate to Source Code Tab, and from the Template dropdown,choose [Java] Webdriver support page object and click on "Generate"



Notice, how easy it is to work with this tool.I hope you'll play around with this tool more n more. :)

No comments:

Post a Comment