Skip to content

Object Repository

2.6.1. Definition

To test any app, Testers need to interact with multiple web elements. To reduce effort and risk of hard-coding the locators in the scripts such as duplication, hard to maintain if there is any change happen to the application; therefore Object Repository was born to help automation testers address all these issues.

Object repository is a centralized storage of locators in the form of objects. Testers store all the element locators in the repository which will be reused in any script when they want to interact with this element. akaAT Studio Object Repository supports testers to store many kinds of locators such as ID, name, Linktext, Partial Linktext, TagName, Class Name, CSS, Xpath, Image.

2.6.2. Create an Object file

Following these steps:

  • Step 1: Select Object Repository from menu. Right-click on the [New] button. You can create folders inside Repository or create Objects directly.

image-20220606123810166

  • Step 2: After creating a new Object, the Object detail screen displays 9 available locators. You can click on [+Add New] button to create a new locator. The priority of the locator is from up to down. If the application cannot find the locator that matches the first one inputted by you, it will trigger to the next locator and do the same with others respectively.

  • Step 3: After clicking on [+Add New] button, a dialog is prompted up for you to choose Locator Strategy. (This only be used in case you edit an existing Object which one of its available locator had been deleted and you want to re-add locator into the list). Once Locator is duplicated, the application will warn you that Locator has already existed.

image-20220606123822471

  • Step 4: Input Locator Value

  • Step 5: Click on [OK] button to create New Locator

  • Step 6: After input corresponding Locator Value, click on the [Save] icon to save this newly created Object.

2.6.3. Components

2.6.3.1. UI Object

No Object Type Description
1 Locator Strategy Drop-down list The type of the object property. Thedrop-down list provides some standard options for your selection
2 Variable Tab Is used for parameter method when userswant to reuse a Locator with multiple variables.
3 Add Button To create a new Locator
4 Delete To delete a Locator, use Delete button on your keyboard
5 Locator Value To complete element locator

2.6.3.2. API Service Object

REST Service Object

No Object Type Description
1 Method Drop-down List Including API methods (GET, POST, PUT, DELETE, ....)
2 URL Textbox URL Path is an address that allows you to access an API and its various features. ...
3 Parameter Tab Options that can be passed with the end point to influence the response.
4 Authentication Tab It offers endpoints so your users can log in, sign up, log out, access APIs, and more.
5 HTTP Header Tab Let the client and the server pass additional information with an HTTP request or response
6 HTTP Body Tab It is the data bytes transmitted in a HTTP transaction message immediately following the headers
7 Add Button For adding new Header or new Parameter
8 Variable Tab Add/Delete Variable used for REST API Object
9 Send Request Button Click to make your call to the REST service

REST Service Object Authentication

Some APIs require authentication details you can send in the akaAT Studio. Authentication involves verifying the identity of the client sending a request, and authorization involves verifying that the client has permission to carry out the endpoint operation. Open the Authentication tab to configure your access details.

  • Authentication Type: You must select one of the authentication types here. If you need other authentication type that is not listed here, select "None" and add header in HTTP Header tab

REST Service Object HTTP Header

Some APIs require you to send particular headers along with requests, typically to provide additional metadata about the operation you are performing. You can set these up in the “Header” Tab. Enter any key-value pairs you need and akaAT Studio will send them along with your request.

image-20220606123922698

No Object Type Description
1 Add Button To add new HTTP Header
2 Header Column Describe Name of the HTTP Header
3 Value Column Describe value of eachHTTP header

REST Service Object HTTP Body

HTTP Body in akaAT Studio allows you to specify the data you need to send with a request. You can send various different types of body data to suit your API.

If you're sending body data, make sure you have the correct headers selected to indicate the content type your API may need to process the received data correctly.

No Object Type Description
1 raw Radio button You can use raw body data to send anything you can enter as text. Use the raw selection, and you can indicate the format of your data in Text, JavaScript or HTML and akaAT Studio will enable syntax-highlighting as well as appending the relevant headers to your request.
2 x-www-form-urlencoded Radio button URL-encoded data uses the same encoding as URL parameters. If your API requires url-encoded data, select x-www-form-urlencoded in the Body tab of your request. Enter your key-value pairs to send with the request and akaAT Studio will encode them before sending.
3 json Radio button If json is selected, you can type your data in format of json
4 xml Radio button If xml is selected, you can type your data in format of xml

REST Service Object Variable

You can use variables in your body data and declare in the “Variable” tab then akaAT Studio will populate their current values when sending your request.

No Object Type Description
1 Add Button To add new Variable
2 Variable Name Column Describe Name of Variable
3 Value Column You can send value when object is called from test step

2.6.3.3. SOAP Service Object

image-soapservise

No Object Type Description
1 Method Drop-down list Select the request method
2 Address field Textbox Enter your SOAP endpoint URL

SOAP Service Object HTTP Header

image-20220606124114022

No Object Type Description
1 Header Column Describe name of the Header
2 Value Column To input value of each Header
3 Add Button To add new Header

SOAP Service Object SOAP Body

image-20220606124126473

You can input your data in format of Text, JavaScript, HTML, json or xml. Your request body should include the SOAP Envelope, Header, and Body tags as required by the endpoint, as well as any namespaces. The data should include the name of the operation, together with any values you need to post to the service.

SOAP Service Object Variable

image-20220606124138892

No Object Type Description
1 Add Button To add new Variable
2 Variable name Textbox Input Variable name
3 Value Column You can input value of each Variable here

2.6.3.4. Database Query Object

image-20220606124150683

image-20220606124201815

No Object Type Description
1 Database Configuration Drop-down list Select Database Config Name you created from Database Setting
2 Execute Query Icon To Execute Select Query
3 Execute Update Icon To Execute Update Query
4 Query String Text Box To input command
5 Variable Tab To set variable for query (see example image above)