Friday, May 6, 2016

In detail about Assets View

Generally OpenScript consists of 4 types of Assets

1) Databanks
                Databanks can be .csv file or database using this we can store our test data and pass to the script.

Creation of Databank

Select Assets Tab -> Select Databanks ->Click Add ->Select CSV file ->Select My Repositories -> Default ->databanks then give File name (It can be any name) in File: text box and click OK. Your databank file will be created.

2) Object Libraries
                Object Library is a file where we can store all the xpaths of our application under test. Xpaths will be stored in this file in the form of name value pairs. Using object libraries we can avoid duplication of the xpaths and reuse the existing xpaths for same web elements.

Creation of Object Libraries

Select Assets Tab -> Select Object Libraries -> Click Add -> Select My Repositories -> Default then give File name (It can be any name) in File: text box and click OK. Your Object Library will be created.

3) JAR Files
                 If you want add any jar files for your script you can add in this section.

4) Scripts
                 If you want to add any child scripts and functional Libraries to your script you can add in this section. We can discuss more about functional libraries and child scripts in coming posts.

Next Topic : Data Tables

Views in OpenScript

Views in OpenScript

Each script has three views in OpeScript as follows.
  • Tree View
  • Java Code View
  • Assets View

Tree View
                In this view we can see the nodes for each statement in the java code view. So using this Tree view we can understand the action of each statement in the java code view.
Java Code View
                In this view we can see the java code generated by the OpenScript. If we want to edit the java code as per our requirement we can do editing in java code view.
Assets View
                In This View we can add the assets to script if required. Generally OpenScript consists 4 types of Assets as follows.
  • Databanks
  • Object Libraries
  • Jars
  • Scripts
Next Topic : In Detail About Assets View

Record and Playback

Record and Playback

To do Record and Playback in OpenScript, First Launch the OpenScript as Run as Administrator (Right click on OpenScript and select Run as Administrator).

Steps to create web script

Go to File -> New -> Select Web (under Functional Testing Section)
Click Next
Select My Repositories -> Default and Give Script name (It can be any name) and click finish.
Script will be created with the name you have given.

Recording the Script

To Record the script click on red color circle in the tool. Once you click the button it will launch the Internet Explorer browser. Now manually enter url of the application under test, here I am giving www.google.com and search for OATS Tutorial text and click search button and close the browser.
Go to java code view of your script and see the recorded steps.

Playback the Script

To Run or Playback the Script, You have to click right arrow symbol in the tool. Then open script will execute all the recorded steps successfully and you can see the results log in Results tab.


Next Topic : Views in OpenScript

Settings In OpenScript and Browser

Settings in OpenScript

Go to Help -> Select OpenScript Diagnosis Tool… and check all the checkboxes and click Next Button. If all the settings are proper you can see all in green otherwise you can see the items in red color.
If you get any red color items, select that particular item and see the error message and follow the instructions to resolve.
Generally you can see the below errors after performing the Diagnosis check. Select that particular item and follow the instructions.
























But make sure that before installing OATS you should install your required browsers and close that.

Settings in Internet Explorer browser

In this tutorial, I am going to perform all the Automation activities in Internet Explorer browser. So we have to check the below settings in Internet Explorer browser.
Open Internet Explorer -> Tools -> Manage add-ons -> Toolbars and Extensions
Make sure that below add-ons should be enable.











With the above settings, OpenScript is ready to start automation activities. If there are any other changes required we will change those while doing automation.

Next Topic : Record and Playback