56
Altametrics Selenium Framework Architecture Version 2.0 Prepared by: Altametrics May 7, 2015 © 2022 Altametrics. All rights reserved.

eRS Automation framework.doc

Embed Size (px)

Citation preview

Page 1: eRS Automation framework.doc

Altametrics

Selenium Framework Architecture

Version 2.0

Prepared by: Altametrics

May 7, 2015

© 2023 Altametrics. All rights reserved.

Page 2: eRS Automation framework.doc

Altametrics Selenium Framework Page 2 Architecture

© 2023 Altametrics. All rights reserved.

Altametrics3191 Red Hill Avenue

Costa Mesa, CA 92626 USATel: (800) 676-1281

Last edited: 18 Apr, 2023

© 2015 Altametrics. All rights reserved.No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language, in any form or by any means,

electronic, mechanical, photocopying, recording, or otherwise, without prior written permission from Altametrics.

All copyright, confidential information, patents, design rights and all other intellectual property rights of whatsoever nature contained herein are and shall

remain the sole and exclusive property of Altametrics. The information furnished herein is believed to be accurate and reliable.

However, no responsibility is assumed by Altametrics for its use, or for any infringements of patents or other rights of third parties resulting from its use.

The Altametrics name and Altametrics logo are trademarks or registered trademarks of Altametrics.

All other trademarks are the property of their respective owners.

Page 3: eRS Automation framework.doc

Altametrics Selenium Framework Page 3 Architecture

Table of Contents

1 Introduction....................................................................................................................................... ..4

2 Architecture of Selenium framework………………………………………………………………………………………………….5

3 TestAutomationConfig.xls …………………………………………………………………………………………………………………….6-12

3.1 Application URL………………………………………………………………………………………………………………………………

3.2 UserName……………………………………………………………………………………………………………………………………….

3.3 Password………………………………………………………………………………………………………………………………………….

3.4 MenuStructureFilepath…………………………………………………………………………………………………………………….

3.5 OutputLogFilepath…………………………………………………………………………………………………………………………….

3.6 BrowserPath……………………………………………………………………………………………………………………………………….

3.7 ExceptionTest……………………………………………………………………………………………………………………………………..

3.8 TestCaseSheet……………………………………………………………………………………………………………………………………

3.9 IsStoreManager………………………………………………………………………………………………………………………………….

3.10 IsCorpAdmin…………………………………………………………………………………………………………………………………….

3.11 IsSuperUser………………………………………………………………………………………………………………………………………

3.12 DatabaseUrl………………………………………………………………………………………………………………………………………

3.13 Database Username………………………………………………………………………………………………………………………….

3.14 Database Password……………………………………………………………………………………………………………………………

3.15Store List…………………………………………………………………………………………………………………………………………….

3.16 Initial auto unpost unapprove object…………………………………………………………………………………………………

3.17 Store Header Name……………………………………………………………………………………………………………………………

3.18 Maximum waiting time b/w applet clicks (in Sec.) ………………………………………………………………………………

3.19 Is applet test is for manager schedule…………………………………………………………………………………………………

3.20 Is Select Role enable while login………………………………………………………………………………………………………….

3.21 select store………………………………………………………………………………………………………………………………………….

© 2023 Altametrics. All rights reserved.

Page 4: eRS Automation framework.doc

Altametrics Selenium Framework Page 4 Architecture

3.22 select Role………………………………………………………………………………………………………………………………………….

4 MenuStructureFile…………………………………………………………………………………………………………………………………… 13

5 ScriptCreationWithDeferentUser………………………………………………………………………………………………………… 13-20

5.1 Test Step No……………………………………………………………………………………………………………………………………..

5.2 Take Screenshot……………………………………………………………………………………………………………………………….

5.3 Click for Alert……………………………………………………………………………………………………………………………………

5.4 Check for Exception…………………………………………………………………………………………………………………………

5.5 Action……………………………………………………………………………………………………………………………………………..

5.6 Sub Action………………………………………………………………………………………………………………………………………

5.7 Commands……………………………………………………………………………………………………………………………………….

5.7.1 GeneratesCSV + Click………………………………………………………………………………………………………………

5.7.2 GenerateFormattedCSV + Click………………………………………………………………………………………………

5.7.3 Go + Select…………………………………………………………………………………………………………………………….

5.7.4 Go + Click……………………………………………………………………………………………………………………………….

5.7.5 Go + linkclick1………………………………………………………………………………………………………………………..

5.7.6 Applet + rightclick+Value………………………………………………………………………………………………………..

5.7.7 Applet+click+Value…………………………………………………………………………………………………………………

5.7.8 Applet + hover+value ………………………………………………………………………………………………………………

5.7.9 Applet + Add Shift+Value…………………………………………………………………………………………………………

5.7.10 bindsheet + start + Value…………………………………………………………………………………………………………

5.7.11 hrtab(Index) + click……….…………………………………………………………………………………………………………

5.7.12 Tab(Index) + click………….…………………………………………………………………………………………………………

5.7.13 bindsheet + end………………………………………………………………………………………………………………………

5.7.14 button + clickbyvisibletext + Value………………………………………………………………………………………….

5.7.15 close + click…………………….………………………………………………………………………………………………………

© 2023 Altametrics. All rights reserved.

Page 5: eRS Automation framework.doc

Altametrics Selenium Framework Page 5 Architecture

5.7.16 post + click…………………….……………………………………………………………………………………………………….

5.7.17 save + click…………………….……………………………………………………………………………………………………….

5.7.18 unpost + click…………………….……………………………………………………………………………………………………

5.7.19 validatebreadcrumb………….…………………………………………………………………………………………………….

5.7.20 Go + validatesummayobjects…………………………….…………………………………………………………………….

5.7.21 wait + buttons(close,save etc) + value………………………………………………………………………………………

5.7.22 waitforinvisibility + buttons(Close, save etc) + Value…………………………………………………………………

5.7.23 Add + Date + Value..………….………………………………………………………………………………………………………

5.7.24 searchforvisibility + td/span/text/textarea/xpath(friendly name) + Value…………………………………

5.7.25 validatecolumn(column/header name) + r(index) + Value.…………………………………………………………

5.7.26 readrow + r(index).…………….………………………………………………………………………………………………………

5.7.27 validatecolumn(column header) + r(index) + latestvalueof(column header).………………………………

© 2023 Altametrics. All rights reserved.

Page 6: eRS Automation framework.doc

Altametrics Selenium Framework Page 6 Architecture

1. Introduction

Selenium is a portable software testing framework for web applications. Selenium provides a record/playback tool for authoring tests without learning a test scripting language (Selenium IDE). It also provides a test domain-specific language  to write tests in a number of popular programming languages, including Java, C#, Groovy, Perl, PHP, Python and Ruby. The tests can then be run against most modern web browsers. Selenium deploys on Windows, Linux, and Macintosh platforms. It is open-source software, released under the Apache 2.0 license, and can be downloaded and used without charge.

Selenium IDE is a complete integrated development environment (IDE) for Selenium tests. It is implemented as a Firefox Add-On, and allows recording, editing, and debugging tests. It was previously known as Selenium Recorder. Selenium-IDE was originally created by Shinya Kasatani and donated to the Selenium project in 2006.

Scripts may be automatically recorded and edited manually providing autocompletion support and the ability to move commands around quickly. Selenium provides commands for performing actions in a browser (click a link, select an option). In our framework, Scripts named is Script creation with different user.

Automation framework has different files which names are given bellow:

TestAutomationConfig.xls

Menu structure file

Code

TestAutomationTestSteps

Test data sheets

AutomationConf.txt

Html output report

Log

© 2023 Altametrics. All rights reserved.

Page 7: eRS Automation framework.doc

Altametrics Selenium Framework Page 7 Architecture

2. Automation Framework Architecture

3. TestAutomationConfig.xls

© 2023 Altametrics. All rights reserved.

CODE

TestAutomationConfig.xls

Menu structure file

TestAutomationTestSteps.

user

Html output report

LogTest Data Sheet

Automation Conf.txt

Page 8: eRS Automation framework.doc

Altametrics Selenium Framework Page 8 Architecture

TestAutomationConfig file is an excel file which has two sheets. Here we store all basic configurations in a single sheet which is used in our automation testing. In main sheet i.e name is setting define all basic configuration file name with their path and value. This excel sheet have all the relevant information of configuration files which is needed in a testing.

E.g.- This file contains the Application URL on where the server can hit for accessing the application, user name & password of the application etc.

The snapshots which show the ExecutionTestconf file very well is given bellow-

In this above figure we can see easily the 22 file name which is stored here and colored by green column. The next columns have the description/value of corresponding this green column.

3.1Application URL- This field have the Application url path which is used to open the application in the browser.

eg- http://marora:7001/scripts/WebObjects.exe/ERS_AUTO_WED.woa,ETC.

© 2023 Altametrics. All rights reserved.

Page 9: eRS Automation framework.doc

Altametrics Selenium Framework Page 9 Architecture

3.2UserName- User name which is used to open the application for automated testing. Egg- ersadmin, Corp etc.

3.3Password- Password corresponding to the above user name for open the application. Egg- mcdtest, login1234 etc.

3.4MenuStructureFilepath- This consist the path of the menu structure file which has all information about the menu items. This path is mapped into the code and we can change path here then code is read the

new path and get the information of menu items according to the new file. By default it is c:\Test\.

3.5OutputLogFilepath- This contains the path on which Logs will be generated after completion a every

step of the Test Case. By default it is c:\Test\.

3.6BrowserPath -Automation tool are used the Mozilla Firefox by default. But if we want to run the Automation tool into any other Browser then we need to download their DriverServer.exe. E.g. For the internet explorer need to download their IEDriverServer.exe. And here we give the path where this DriverServer.exe are stored.

E.g.- C:\Users\test3\Downloads\.

3.7ExceptionTest- Till now it is not in working.

3.8TestCaseSheet- It have a path of excel sheet where we write the Test Cases. All test case sheets are saved in a particular file which name is TestAutomationTestSteps and a predefined path which is C:\\Test Automation\\TestAutomationTestSteps.xls. But it is configurable. If we want to change the path, we can.

3.9IsStroreManager- Till now it is not in working.

3.10IsCorpAdmin- Till now it is also not in working.

3.11IsSuperUser- Till now it is also not in working.

3.12DatabaseUrl- It contains the URL of the Data Base server where the Application URL hit to this database server. It makes with the combination of IP address of the DB, port number and DB version.

E.g.- jdbc:oracle:thin:@192.168.0.78:1521:DB11g.

Note-Always it will remain same of condict file url which is present in your application schema.

3.13Database Username- It consists the user name of the database where you saved the data and retrieve the data. Mostly database user name will be your Schema Name and present in the Condict file.

E.g.- ERS_AUTO_WED, feb_2015_training42 etc.

© 2023 Altametrics. All rights reserved.

Page 10: eRS Automation framework.doc

Altametrics Selenium Framework Page 10 Architecture

3.14Database Password- This is storing the password corresponding to above database user name. Mostly It is also the Schema Name and present in Condict file.

E.g. ERS_AUTO_WED, feb_2015_training42 etc.

Note- Snapshot of the Condict file which have all these three above----

3.15Stores List- we want to test more than 1 object or store, then we need to give all those store names separated by the tilde symbol (~) here, which is called the Stores List.

Note- we need to give the Select Store into the Value column with command linkclickall instead of linkclick1 into the ScriptCreationCheckListwithDifferentUsers file.

Egg- The snapshot is giving below for it-

3.16Initial auto unpost unapprove object- we give the value TRUE then Automation will open an object and do unapprove from approved and unpost from post .

Note- This configuration does not apply to the Production Application but we can. Mainly this is used for our Testing Application.

© 2023 Altametrics. All rights reserved.

Page 11: eRS Automation framework.doc

Altametrics Selenium Framework Page 11 Architecture

3.17Store Header Name- Application Screen has a column name which have the store name upon this column and this is called the Header Name. It may be a Store Name or any friendly name according to the client requirement.

As above figure is showing that the header name is Store which have the store name list as the arrow is showing.

3.18Maximum waiting time b/w applet clicks (in Sec.)- In this column we give the seconds which tells us how much time automation script wait for the next window/Command after clicking the Applet. If next window is not open in given time, then Automation skip this Step and move to the next command. So that Testing can’t be stopped.

3.19Is applet test is for manager schedule- Till now it is also not in working.

3.20Is Select Role enable while login- value is True if in this column, Automation need to know that user are doing login from which, either a Store name or any user role.

The snapshot is given bellow-

© 2023 Altametrics. All rights reserved.

Page 12: eRS Automation framework.doc

Altametrics Selenium Framework Page 12 Architecture

3.21Select store- Automation select the Store Name from the dropdown which Snagit is given bellow Note- Home screen will be different if selects the User Role.

Fig- Store selecting time.

© 2023 Altametrics. All rights reserved.

Page 13: eRS Automation framework.doc

Altametrics Selenium Framework Page 13 Architecture

Fig- Home Page after selecting Store.

3.22Select Role- Automation select the User Role from the dropdown which is given below-

Fig- User Role selecting time.

© 2023 Altametrics. All rights reserved.

Page 14: eRS Automation framework.doc

Altametrics Selenium Framework Page 14 Architecture

Fig- Home page/Dashboard after selecting the User Role Corp.

© 2023 Altametrics. All rights reserved.

Page 15: eRS Automation framework.doc

Altametrics Selenium Framework Page 15 Architecture

4. MenuStrustureFile

Menu structure file is basically a property file that contains key and value pair. Property file is a part of programming language to store data according on the basis of key and values. In this file, key symolise the sub menu name that is an e*RS sub menu and value represends its id that is assigned to it on the UI.

Menu structure file will be created automatically for the very first time ane every time when we login with different user or different application with the name USERNAME+URL. This name is just for the uniqueness of the file so tha program can identify it. After that, if menu file already exists, it will fetch the value according to the given key.

Menu file contents are like :

DashBoard = dijit_MenuItem_0_text

Universal\ Projection = dijit_MenuItem_1_text

Log\ Out = dijit_MenuItem_2_text

Inventory = dijit_MenuItem_3_text

Receiving = dijit_MenuItem_4_text

Note : 1. These id are fetched at the very first time when menu file does not exists.

2 As the code fetch menufile dynamically, id and name may differ according to the user or application.

5. TestAutomationTestSteps

This is the main file for the automated testing. Here we write the all TestCases which is used to test the application. Write the test cases in the excel sheets and import to sheet into this file.

Note- 1. Always the sheet name should remain same as the Menu Item name and give the friendly name or comment also with this name using the symbol (|).

Egg- Weekly Labor Scheduler|Wee.View, Weekly Labor Scheduler|verify etc.

This sheet contains the various column name like Test step no, TakeScreenShot, Check for Alert, Check for Exception, Action, Sub Actions, Command, Values and Skip Step.

© 2023 Altametrics. All rights reserved.

Page 16: eRS Automation framework.doc

Altametrics Selenium Framework Page 16 Architecture

The snapshot of this file is given bellow-

5.1Test Step No- Test Cases are always written into test steps means every test case has many numbers of test steps. This column represents how many numbers of test step are here.

5.2TakeScreenShot - We want to take the screen shot after this step, then we have to assign the value 1 into this column. Except, of value 1 it will not take the screenshot.

5.3Check for Alert- Till now it is not in working.

© 2023 Altametrics. All rights reserved.

Page 17: eRS Automation framework.doc

Altametrics Selenium Framework Page 17 Architecture

5.4Check for Exception- In this column except of value 0, check the exception for all the values either string or blank, which are coming after performing this step to the application.

Eg- java.lang.nullpointer etc which snapshot is given below—

5.5Action- In this column give the description of the sub Action with command means it describe the message or comment which are doing through the Sub Action with Command.

5.6Sub Action- This column contains the name on which the commands are executed like Applet, Go etc.

5.7Command- Command is the main thing in this whole process of testing. Using command performs all Test Steps which we needed in our application for testing.

© 2023 Altametrics. All rights reserved.

Page 18: eRS Automation framework.doc

Altametrics Selenium Framework Page 18 Architecture

All commands are given below----------

5.7.1 SubAction : GenerateCSV, Command : click, Value : Not Required :- When click on

GenerateCSV then it will generate an report.

Sub Action: Generate CSV

Command: Click

Value: Not required

Description: Generating a CSV report.

5.7.2 SubAction : GenerateFormattedCSV, Command : Click, Value :

NotRequired :- When click on GenerateFormatedCSV then it will generate a formatted report.

Sub Action: GenerateFormattedCSV

Command: Click

Value: Not required

Description: Generating a formatted CSV report.

© 2023 Altametrics. All rights reserved.

Page 19: eRS Automation framework.doc

Altametrics Selenium Framework Page 19 Architecture

5.7.3 SubAction :Go, Command : Select, Value :validateoptions(Dropdown Options)/setdaterange(date range options)/setstore(getuniversalstore):-

Using this command, selecting the date range from giving dropdown in the summary screen. It gives mid values of date range. Eg.3month.

Sub Action: Go

Command: Select

Value: Case1: no value

Case2: mismatch value

Case3: match value

Case4: setdaterange (date range)

Case5:validateoptions(Dropdown Options)

Case6:setstore(getuniversalstore)

Description: For case1: Middle value from the dropdown list will be selected.

For case2: Middle value from the dropdown list will be selected.

For case3: Matched value will be selected.

For case4: To set date range so that further commands like validatesummaryobjects

© 2023 Altametrics. All rights reserved.

Page 20: eRS Automation framework.doc

Altametrics Selenium Framework Page 20 Architecture

can use that date. Note: You can only pass the existed value of date range dropdown. Otherwise it will throw an exception.

For case5: This command is used to validate the select date range dropdown whether the list contains date range in the following sequence: Select All, 1 Week, 2 Week, 4 Week, 1 Month, 3 Month, 6 Month, 1 Year, 2 Year, 5 Years"

For case6: Pick the store which is stored in TestAutomationConfig named file and after tha we can use it anywhere by using getuniversalstore keyword in the value column.

5.7.4 SubAction : Go, Command : Click, Value : Not Required :- Click on Go button.

Sub Action: Go

Command: Click

Value: Not required

Description: This command is used to click go button.

© 2023 Altametrics. All rights reserved.

Page 21: eRS Automation framework.doc

Altametrics Selenium Framework Page 21 Architecture

5.7.5 SubAction : Go, Command : linkclick(index no), Value : Not Required :- Through

this command the Cursor goes to an object and click on first Link which is highlighted in the snapshot.

Sub Action: Go

Command: linkclick1

Value: Not required

Description: This command is used to click on the summary obect links using its index. E.g. linkclick1 will click on the first object.

5.7.6 SubAction:applet, Command:rightclick, Value: Not Required:-:- Through this command Cursor go to the applet and perform rightclick.

© 2023 Altametrics. All rights reserved.

Page 22: eRS Automation framework.doc

Altametrics Selenium Framework Page 22 Architecture

Sub Action: Applet

Command: Right click

Value: Case 1. A path from which value is coming on to the screen. Egg:- C:\\HrTestCasesSel\\Applet Images\\javaconsole.png.

Case 2. Text

Description: Case 1. Search and rightclick on the image whose path is given in value column.

Case 2. Search and rightclick on the text given in value column.

The process of performing this whole command, the snapshot is given below-

5.7.7 SubAction:applet,Command:click, Value: Not Required:-- Go to the applet and perform leftclick

© 2023 Altametrics. All rights reserved.

Page 23: eRS Automation framework.doc

Altametrics Selenium Framework Page 23 Architecture

Sub Action: Applet

Command: click

Value: Case 1. A path from which value is coming on to the screen. Egg:- C:\\HrTestCasesSel\\Applet Images\\javaconsole.png.

Case 2. Text

Description: Case 1. Search and leftclick on the image whose path is given in value column.

Case 2. Search and leftclick on the text given in value column.

5.7.8 SubAction:applet, Command:hover, Value: Not Required:- This Command holds the applet till performing the next step.

Sub Action: Applet

Command: Hover

Value: Case 1. A path from which value is coming on to the screen. Egg:- C:\\HrTestCasesSel\\Applet Images\\javaconsole.png.

Case 2. Text

Description: Case 1. Search and hover over the image whose path is given in value column.

© 2023 Altametrics. All rights reserved.

Page 24: eRS Automation framework.doc

Altametrics Selenium Framework Page 24 Architecture

Case 2. Search and hover over on the text given in value column.

The snapshot shows all of thing which is given bellow-

5.7.9 SubAction:applet, Command:Add Shift, Value: Required:- Go to the applet and click on Add Shift.

Sub Action: Applet

Command: Add Shift

Value: Job Code, employeename e.g closing,Aana peterson

Description: Select the values from drop down of Add Shift dialog box of applet before performing the next step like job type, employee name etc.

© 2023 Altametrics. All rights reserved.

Page 25: eRS Automation framework.doc

Altametrics Selenium Framework Page 25 Architecture

5.7.10 SubAction : bindsheet, Command : start, Value :Required :- “bindsheet ”shows

the binding a sheet from specified path.

5.7.11SubAction : hrtab ( Index ) , Command : click, Value :NotRequired :-

© 2023 Altametrics. All rights reserved.

Sub Action: Bindsheet

Command: Start

Value: Path of sheet e.g C:\\HrTestCasesSel\\Test Data Sheets\\LOA.xls.

Description: Binding one sheet to another sheet for mapping the column values from

the given path. Eg: C:\\HrTestCasesSel\\Test Data Sheets\\LOA.xls.

Sub Action: Hrtab(index) e.g hrtab6

Command: Click

Value: Not required.

Description: Click on the tab whose index is given in the value subaction column along with hrtab keyword. E.g. the above will click on the 6th tab means wage/job code.

Page 26: eRS Automation framework.doc

Altametrics Selenium Framework Page 26 Architecture

5.7.12SubAction : Tab ( Index ), Command : click, Value :Not Required :-

© 2023 Altametrics. All rights reserved.

Sub Action: Tab (index) e.g Tab2

Command: Click

Value: Not required.

Description: This will click on the detail tab whose index is given along with “Tab” keyword. E.g : it will click on tab 2 i.e Hr Maintainence.

Page 27: eRS Automation framework.doc

Altametrics Selenium Framework Page 27 Architecture

5.7.13SubAction : bindsheet, Command : end, Value :Not Required :-

© 2023 Altametrics. All rights reserved.

Sub Action: Bindsheet

Command: End

Value: Not Required

Description: This command works with Binsheet start. If execution completes i.e all the rows of test data sheet have been executed successfully, it will move to next line item other wise it will take the control again to upper bindstart sheet again and again until all the sheets of Test Data sheet completes its execution.

Page 28: eRS Automation framework.doc

Altametrics Selenium Framework Page 28 Architecture

5.7.14Subsection : button, Command : clickbyvisibletext , Value : button name :-

5.7.15SubAction : close, Command : click , Value :Not Required :-

© 2023 Altametrics. All rights reserved.

Sub Action: Button

Command: Clickbyvisibletext

Value: Button name

Description: This command click on button according to visible text as shown on button. E.g: If we provide value “Add” in value column, it will click on the add button if it is visible on the screen.

Sub Action: Close

Command: Click

Value: Not Required

Description: This command is click to click close button.

Page 29: eRS Automation framework.doc

Altametrics Selenium Framework Page 29 Architecture

5.7.16SubAction : post, Command : click, Value :Not Required :-

© 2023 Altametrics. All rights reserved.

Sub Action: Post

Command: Click

Value: Not Required

Description: This command is to click on the post button.

Page 30: eRS Automation framework.doc

Altametrics Selenium Framework Page 30 Architecture

5.7.17SubAction : save, Command : click, Value :Not Required :-

5.7.18SubAction : Unpost , Command : click, Value : Not Required :- This command is

used to click on Unpost button.

© 2023 Altametrics. All rights reserved.

Sub Action: Save

Command: Click

Value: Not Required

Description: This command is used to click on the save button.

Sub Action: Unpost

Command: Click

Value: Not Required

Description: This is used to Unpost the object.

Page 31: eRS Automation framework.doc

Altametrics Selenium Framework Page 31 Architecture

5.7.19SubAction : validatebreadcrumb , Command : Blank , Value : Not Requried -

This sub-action validate the path of the current screen in the application like Food > Menu Mix > 023486, Orlando, FL

> 06/16/2015

5.7.20SubAction : Go , Command : validatesummayobjects , Value :Not Required :-

This command is used to validate the date objects on the summary screen according to selected date range from the dropdown.

© 2023 Altametrics. All rights reserved.

Sub Action: Validatebreadcrumb

Command: Blank

Value: Blank

Description: This command is used to validate detail screen bread crumb.

Sub Action: Go

Command: Validatesummayobjects

Value: Not Required

Description

Description:

This command is used to validate the date objects. If we select a date range 1 month from the drop down, then it will validate the one months object with the database objects.

Page 32: eRS Automation framework.doc

Altametrics Selenium Framework Page 32 Architecture

5.7.21SubAction:wait Command :close/Go/save/post/saveandclose/Delete/Approve/Unpost/Unaprove Value:Required : -

Next step will not be executed until, the Go / Close button will not find within time in the value column and time will be given in seconds in the value column.

© 2023 Altametrics. All rights reserved.

Sub Action: Wait

Command: Closer/Go/save /saveandclose/Post Delete/Approve/Unpost/Unapprove

Value: Time will be given in seconds in the value column. E.G. – 120 means 2 minutes.

Description: The next step will execute when Closer/Go/save /saveandclose/Post Delete/Approve/Unpost/Unapprove button will find within a time as in the value column.

Page 33: eRS Automation framework.doc

Altametrics Selenium Framework Page 33 Architecture

5.7.22SubAction: waitforinvisibility , Command :close/Go/save/saveandclose/Post/Approve/Delete/post/Unapprove, Value:Required : - Go or Close button will not be invisible, next step Will wait for execution within time in the value column. Time will be given in seconds in the value column.

5.7.23SubAction:Add ,Command : date , Value: Required : - This command will be used to give dates when a new object will be added.

© 2023 Altametrics. All rights reserved.

Sub Action: Waitforinvisibility

Command: Close/Go/save /saveandclose/Post Delete/Approve/Unpost/Unapprove

Value: Time will be given in seconds in the value column. E.G. – 120 means 2 minutes.

Description: Until Close/Go/save /saveandclose/Post Delete/Approve/Unpost/Unapprove button will not be invisible within time in the value column, till then Next step execution will wait.

Page 34: eRS Automation framework.doc

Altametrics Selenium Framework Page 34 Architecture

5.7.24SubAction:searchforvisibility ,Command : td/span/text/textarea/xpath(friendly name) , Value: Required : - This command is used to search content. Which is present in the value column .

© 2023 Altametrics. All rights reserved.

Sub Action: Add

Command: Date

Value: Case 1. currentdate

Case 2. currentdate+n

Case 3. currentdate-n

Case 4: MM/DD/YYYY

Description: Case 1. By using “currendate” keyword. We can pass the system current date in the textbox.

Case 2. By using “currentdate+n” keyword we can pass the nth day after the system current date.

Case 3. By using “currentdate-n” keyword we can pass the nth day before the system current date.

Case 4: 10/10/2010

Note: if there is any syntax mistake while giving value in value column, it will pass that value and it may create problems in execution process.

Page 35: eRS Automation framework.doc

Altametrics Selenium Framework Page 35 Architecture

Note-

Automation team will let you know whether to use span, td or text in command column

5.7.25 SubAction:validatecolumn(column/header name),Command :r( index), Value : Required : - This command is used to validate a particular column. Means, this column contains assigned value or not. Which present in the value column. The row number is passed in command column.

© 2023 Altametrics. All rights reserved.

Sub Action: Searchforvisibility

Command: Span/td/text/textarea/button/xpath(friendly name)

Value: Case1- No value

Case2-Value mismatch

Case3-value matched

Case4-td/span/text

Case5-textarea

Case6-xpath(friendly name)

Description: For case1: This will check for the visibility of empty tag.

For case2: It will fail the step.

For case3: This will pass the step.

For case4-This is used to search the content on screen which is given in the value column. The content will be according to the tag given in command column and that may be span/text/td/textarea/button.

For case5- This will search for the value given in value column under the tag textarea.

For case6- In this, we have to pass xpath friendly name within the braces.(friendly name is defined in xpath.properties file). After that using this xpath, it will search for the value that is given in the value column. It works with xpath as given.

Page 36: eRS Automation framework.doc

Altametrics Selenium Framework Page 36 Architecture

5.7.26 SubAction: readrow, Command : r(index), Value: Not Required: -

This command is used to read the row value of record on detailed screen.

© 2023 Altametrics. All rights reserved.

Sub Action: Validatecolumn(Column Name)

Command: r(index) Eg- r1, r2 etc.

Value: Which needs to be validated? E.g.- Yes, No etc.

Description: This is used to validate a particular column (may be of summary or detail screen). We have to pass the column name that we have to validate within the braces of sub action. In command column, we have to provide the row index i.e the row that we want to validate. In value column, we have to pass the value that we want to validate.

Sub Action: Readrow

Command: r(index) E.g.- r1, r2 etc.

Value: Not Required

Description: This command is used to read the row according to the index given in command column. This will store the whole row in the code internally and that we can further use.

Page 37: eRS Automation framework.doc

Altametrics Selenium Framework Page 37 Architecture

5.7.27 SubAction: validatecolumn(column header), Command : r(index), Value : latestvalueof(column header) : - This command is used to validate the latest column value with he values which are read by readrow command.

© 2023 Altametrics. All rights reserved.

Sub Action: Validatecolumn(column header )

Command: r(index) E.g.- r1, r2 etc.

Value: latestvalueof(column/header name)

Description: Purpose of this command is to validate the column values with the another column values of a particular row which is read by readrow command.

Page 38: eRS Automation framework.doc

Altametrics Selenium Framework Page 38 Architecture

© 2023 Altametrics. All rights reserved.

Page 39: eRS Automation framework.doc

Altametrics Selenium Framework Page 39 Architecture

5.7.28 SubAction:switchtomenu, Command : not required, Value : sub menu name : -

5.7.29 SubAction:chart, Command : click, Value : not required : -

5.7.30 SubAction:checkalert, Command : not required, Value : actual message : -

© 2023 Altametrics. All rights reserved.

Sub Action: switchtomenu

Command: Not required

Value: Sub menu name

Description: This command is used to switch to other the menu whose name is given in value column.

Sub Action: chart

Command: click

Value:

Description: This command is used to click on chart button that is present on many of the summary screens.

Page 40: eRS Automation framework.doc

Altametrics Selenium Framework Page 40 Architecture

5.7.31 SubAction:validatesummayobjects, Command : not required, Value : not required : -

5.7.32 SubAction:validateshowall, Command : not required, Value : not required : -

5.7.33 SubAction:thread, Command : sleep, Value : time(in milli seconds) : -

© 2023 Altametrics. All rights reserved.

Sub Action: checkalert

Command:

Value: Actual message

Description: This command is validate the validation message that we get get after clicking on any button like close, save etc.

Sub Action: validatesummaryobjects

Command: Not required

Value: Not required

Description: This command is validate the summary objects according to date given in the date range dropdown.

Sub Action: validateshowall

Command: Not required

Value: Not required

Description: This command is used to validate the no. of objects after clicking on summary screen show all button.

Page 41: eRS Automation framework.doc

Altametrics Selenium Framework Page 41 Architecture

5.7.34 SubAction:testfood, Command : actioninnertextclick/actioninnertextvisibility, Value : Object name under action tab of detail screen : -

5.7.34 SubAction:testfood, Command : validateCatalogFolio, Value : not required : -

© 2023 Altametrics. All rights reserved.

Sub Action: Thread

Command: sleep

Value: Time in milli seconds e.g 8000 i.e 8 seconds

Description: This command is used to stop the script for the time given in value column.

Sub Action: testfood

Command: Case 1. Actioninnertextclick

Case 2. Actioninnertextvisibility

Value: Object name under action tab of detail screen.

Description: Case 1. Click on the object given in value column.

Case 2.Check for visibility of the object given in value column.

Sub Action: testfood

Command: validateCatalogFolio

Value: Not required

Description: Case 1. Click on the object given in value column.

Case 2.Check for visibility of the object given in value column.

Page 42: eRS Automation framework.doc

Altametrics Selenium Framework Page 42 Architecture

5.7.35 SubAction: validatedata( Column Name,xpath friendlyname), Command : not required, Value : not required : -

5.7.36 SubAction: validatedata( Column Name,xpath friendlyname), Command : not required, Value : not required : -

5.7.37 SubAction: readrowandvalidate, Command : all, Value : not required : -

© 2023 Altametrics. All rights reserved.

Sub Action: validatedata(columnname, xpath friendly name)

Command: Not required

Value: Not required

Description: We have to pass column name that we want to validate before comma(,) and after comma, we have to pass xpath friendly name that we have defined in xpath.properties.

Sub Action: Columnheader

Command: Click

Value: Column name

Description: To click on column header by getting column header from value column

Sub Action: readrowandvalidate

Command: all

Value: Not required

Description: To read all the rows with all the data as showing in summay screen table/detail screen table.

Page 43: eRS Automation framework.doc

Altametrics Selenium Framework Page 43 Architecture

5.7.38 SubAction: Tab, Command : currentvisibletab, Value : tab name : -

5.7.39 SubAction: validatecolumn(Column name), Command :r(row index), Value : required : -

5.7.40 SubAction: intablelinkr(rowIndex)c(columnIndex), Command :click, Value : not required : -

© 2023 Altametrics. All rights reserved.

Sub Action: Tab

Command: currentvisibletab

Value: Tab name

Description: To validate the current tab with tab name given in value column.

Sub Action: Validatecolumn(column name)

Command: r(row index)

Value: Case 1. formula(Column name 1*column name 2)

Case 2. latestvalueof(column name)

Description: Case 1. To validate the value that comes after appliying formula like multiplication of two column values of the row whose row index is given in command column.

Case 2. To validate the latest value of the column name that has already been set in previous commands for the row whose row index is given in command column.

Page 44: eRS Automation framework.doc

Altametrics Selenium Framework Page 44 Architecture

5.7.41 SubAction: intableCheCkboxr(rowIndex)c(columnIndex), Command :click, Value : not required : -

5.7.42 SubAction: intabletextr(rowIndex)c(columnIndex), Command :text, Value : required : -

© 2023 Altametrics. All rights reserved.

Sub Action: Intablelinkr(row index)c(column click)

Command: click

Value: Not required

Description: This command is used to click on the link that comes under the summary screen table or detail screen table. This works according to the row index and column index given with it.

E.g : To click on the link that is coming in table on 4th row and 3rd column. We have to use intablelinkr4c3 in sub action.

Sub Action: IntableCheCkboxr(row index)c(column click)

Command: click

Value: Not required

Description: This command is used to check the checkbox that comes under the summary screen table or detail screen table. This works according to the row index and column index given with it.

E.g : To check the checkbox that is coming in table on 4th row and 3rd column. We have to use intableCheCkboxr4c3 in sub action.

Page 45: eRS Automation framework.doc

Altametrics Selenium Framework Page 45 Architecture

© 2023 Altametrics. All rights reserved.

Sub Action: Intabletextr(row index)c(column click)

Command: text

Value: Case 1. text

Case 2. Latestvalueof(stored name)

Description: This command is used to sned data in the textbox that comes under the summary screen table or detail screen table. This works according to the row index and column index given with it.

E.g : To send text in a textbox that is coming in table on 4th row and 3rd column. We have to use intabletextr4c3 in sub action.

Case 1. To send the text from value column to the textbox.

Case 2. To send the text from already stored value that was set initially.