session objectives reserved words and object type conditional usage of reserved words usage of...
TRANSCRIPT
![Page 1: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/1.jpg)
Session Objectives
• Reserved Words and Object type Conditional
• Usage of Reserved Words
• Usage of Conditional Logic
2
![Page 2: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/2.jpg)
Reserved Words
• Reserved Words have special meaning to PTF.
• Each of these words predefined to perform specific functions
when used in a test.Ex.: #TODAY – Applies the current date to the field against which it isentered.
• Reserved words are useful when data is not known before the
test is executed.
• Reserved words enable you to access data available from the
PTF program when a test is executed.
Session 8 - Reserve Words and Conditional Slide 3
![Page 3: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/3.jpg)
Reserved Words
• #DIS#
• #DTTM
• #EXIST#
• #FAIL#
• #CHECK#
• #LIKEF
• #LIKEW#
• #NOTEXIST#
• #PREFIX#
Session 8 - Reserve Words and Conditional Slide 4
![Page 4: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/4.jpg)
Reserved Word – #DIS#
• Verifies a value and checks whether the object is display-only.
• Logs a Fail if the object is not display-only
• If you use #DIS# without a value, then the value isignored and #DIS# only checks for whether the field isdisabled.
• This reserved word is useful when, the object is visiblebut not editable.
Reserve Word#DIS#
Session 8 - Reserve Words and Conditional Slide 5
![Page 5: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/5.jpg)
Reserved Word – #DTTM
#DTTM
Populate current date and time into a field.
Reserve Word#DTTM
Session 8 - Reserve Words and Conditional Slide 6
![Page 6: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/6.jpg)
Reserved Word – #EXIST#
• Verifies a field exists and return the Value ‘Pass’ if fieldexists else ‘Fail’
• If a value is passed, set the field to value.
Example• The first step checks for whether the designated Work Location Id
field exists in the application and logs a fail if it is not found.• The second step not only checks for the existence of the field; it
attempts to enter the value 003 into it.Reserve Word#EXIST#
Session 8 - Reserve Words and Conditional Slide 7
![Page 7: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/7.jpg)
Reserved Word – #FAIL#
• Performs comparison but does not update the value.
• A Fail is logged if value is not matched else a pass islogged
Similar Reserved Word - Check
Example• In this example, the PTF logs a fail if the Desig Work Location Field
is not equal to 003.
Reserve Word#FAIL#
Session 8 - Reserve Words and Conditional Slide 8
![Page 8: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/8.jpg)
Reserved Words- #CHECK#
• Performs Comparison in an object against the expectedvalue.
• Updates the value if data does not match
• Would not update the value if data matches
Example• In this example, the PTF sets the value to KUSPTEST
Session 7 - Reserve Words and Conditional Slide 9
![Page 9: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/9.jpg)
Reserved Word – #LIKEF# (LikeFail)
• Look for Similar Values, not an exact match
• Similar match is not found, it logs a Fail.
Type of Match Pattern Match (Log a Pass) No Match (Log a Fail)
Multiple characters a*a aa, aBa, aBBBa ABC
Multiple characters *ab* abc, AABB, Xab aZb , bac
Multiple characters ab* abcdefg, abc cab, aab
Reserve WordExample #LIKEF#
• Some fields contain the current date and time. Use the #LIKEF##TODAY*
Session 8 - Reserve Words and Conditional Slide 10
![Page 10: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/10.jpg)
Reserved Word – #LIKEW# (Like Warning)
• Look for Similar Values, not an exact match
• Similar match is not found, it logs a Warning.
ExampleReserve Word
Matches the wild card string, the status is Green #LIKEW#
Status of thecomparison #LIKEW#
Session 8 - Reserve Words and Conditional Slide 11
![Page 11: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/11.jpg)
Reserved Word – #LIKEW# (Like Warning)
• Look for Similar Values, not an exact match
• Similar match is not found, it logs a Warning.
ExampleReserve Word
When the wildcard string does not have similarvalue#LIKEW#
Status of the comparisonwhen does not match
Session 8 - Reserve Words and Conditional Slide 12
![Page 12: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/12.jpg)
Reserved Word – #NOTEXIST#
• The opposite of the #EXIST# reserved word,#NOTEXIST# verifies that a field does not exist.
• If the field does not exist, a Pass is logged, else a Fail islogged.
Reserve Word#NOTEXIST#
Session 8 - Reserve Words and Conditional Slide 13
![Page 13: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/13.jpg)
Reserved Words – #PREFIX#
• Substitutes the text in the Prefix field in the Test Editor for the
#PREFIX# string in the value field.• Appends the text if #PREFIX# reserved word is used at the
beginning of the text in the Value field.• This substitution enables to modify test data.
• This substitution is useful when same test has to be run ondifferent employee id’s or on different effective dates.
Prefix – Mail ID
Session 8 - Reserve Words and Conditional Slide 14
![Page 14: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/14.jpg)
Reserved Words – #PREFIX#
• Using #PREFIX# reserve words, the effective date value coule
changed and used in the Test
Prefix – Eff. Date
Session 8 - Reserve Words and Conditional Slide 15
![Page 15: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/15.jpg)
Object Type – Conditional
• Conditional logic enables PTF it to take action based onfulfillment/non- fulfillment of a condition.
• Action ‘If_Then’ – Validate the given Condition
• Action ‘End_If’ – Close the Statement of ‘If_Then’
• Between the above two statements, the set of steps whichcan be executed when the condition is correct.
• ret=&variable - returns the value of the field acted upon intothe variable.
• ‘Else’ is not available. Nested condition cannot be performed.
• Online Page Field cannot be used to compare the value.Value should be retrieved from the Field name and assign it to
Variable.
Session 8 - Reserve Words and Conditional Slide 16
![Page 16: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/16.jpg)
FLOWCHART OF CONDITIONAL LOGIC
PTF Steps
True
Condition
False Steps Executed
Rest of PTF Steps
Session 8 - Reserve Words and Conditional Slide 17
![Page 17: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/17.jpg)
Steps to add Conditional Logic
Record the test and save it
Go to the Test Editor and insert a new row
Make a note of the field which needs to be verified
Type/Exist – to verify the field/button etc.
Under recognition, give the field name followed by ret=&var(Returns value to Variable)
Conditional/If_Then – to apply a condition to the variable
Enter the action to be performed in the next row, if theconditional holds true
Conditional/End_If – to end the conditional
Session 8 - Reserve Words and Conditional Slide 18
![Page 18: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/18.jpg)
Online Page – ConditionalConcept:Special steps based on the information gathered from the application during a test
If the work location codeis blank then it is filled
Session 8 - Reserve Words and Conditional Slide 19
![Page 19: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/19.jpg)
Object Type – Conditional
Concept:How to use the Object Types,Actions : Conditional,If_Then,End_If
Conditional If Then &Var=/<> Value&x1 = ‘075’
Conditional End If
Session 8 - Reserve Words and Conditional Slide 20
![Page 20: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/20.jpg)
Object Type – Conditional
Concept: Syntax for If_ThenHow to use the Object Types,Actions : Conditional,If_Then,End_If
If_Then supports these logical operators:
<>, >=, <=, >, <, =
Format/Syntax
Conditional.If_Then
Enter Condition in Recognition Column.
Session 8 - Reserve Words and Conditional Slide 21
![Page 21: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/21.jpg)
Log – Conditional
Session 8 - Reserve Words and Conditional Slide 22
![Page 22: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/22.jpg)
Business Usage – Conditional
The following are examples of various business cases where theconditional logic has been used in PTF:
• While hiring a person, on entering his name, if duplicate
names are found, then a message pops up which is tackledthrough conditional logic.
• While modifying the Job Code in Job Data of a Person, if the
Job Code has a Union Code, then other Union fields such asUnion Seniority Date are filled.
Session 8 - Reserve Words and Conditional Slide 23
![Page 23: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/23.jpg)
Training
• Hand out the Training Material
• To be completed in 30 minutes
Discussion
• Walk through the Log
• Explaining the log Results
• Highlight the Key words and lesson learned
Session 8 - Reserve Words and Conditional Slide 24
![Page 24: Session Objectives Reserved Words and Object type Conditional Usage of Reserved Words Usage of Conditional Logic 2](https://reader036.vdocuments.mx/reader036/viewer/2022062423/5697c01d1a28abf838cd058a/html5/thumbnails/24.jpg)
Q & A and Comments
Session 8 - Reserve Words and Conditional Slide 25