UFT Class 32

UFT Class 32 (Batch Testing/ Batch Execution) Batch Testing: Executing series of Tests > It is one of the advantages of Test Automation, In Manual Testing for each and every Test case execution human user interaction is mandatory. If It is automation Test Tool can execute series of tests without user interaction. They are four … Read more

UFT Class 31

UFT Class 31 (VBScript Excel Application Operations Part-2) Excel Application Object (Main Object) Set Variable = CreateObject(“Excel.Application”) ———————————— Excel Workbook Object (Sub Object) Set Variable = ExcelApplicationObject.Workbooks.Add/Open(“File path”) ——————————————– Excel Work sheet object (Sub-sub Object) Set Variable = ExcelWorkBookObject.Worksheets(Sheet id) ——————————————————– Examples: ‘Read data from an excel file and perform data driven testing for login … Read more

UFT Class 30

UFT Class 30 (VBScript File System Operations Part-2, Excel Object Model Part-1) ‘Read Test Data from a Text file and perform Data Driven Testing for Login Functionality. Dim objFso, objTextstream, myLine, myField Set objFso = CreateObject(“Scripting.FileSystemObject”) Set objTextstream = objFso.OpenTextFile(“C:\Users\G C Reddy\Desktop\UFT.txt”) objTextstream.SkipLine Do Until objTextstream.AtEndOfStream = True myLine = objTextstream.ReadLine myField = Split(myLine, “, … Read more

UFT Class 29

UFT Class 29 (VBScript File System Operations) > What is Computer File System? It is a feature of Operating System, used to work with Drives, Folders and files. Computer understands things in terms of files only, Computer point of view everything is file. > Examples for File system Operations Create a folder Copy a folder … Read more

UFT Class 28

UFT Class 28 (VBScript Built in Functions part-2, Many to Many Comparisons Example) 28) CreateObject Function It creates an automation object in a specified class. Examples: Dim objFso ‘Create File System Object, It is used to work with Drives, folders and files. Set objFso = CreateObject(“Scripting.FileSystemObject”) Dim obJExcel ‘Create Excel Application object, It is used … Read more

UFT Class 27

UFT Class 27 (VBScript Built in Functions) 1) Abs Function (It returns absolute value) Dim val val = 100.75 Msgbox Abs(val) ‘100.75 val = 100.25 Msgbox Abs(val) ‘100.25 Msgbox Abs(100.60) ‘100.6 val = -100.85 Msgbox Abs(val) ‘100.85 2) Round Function Dim val val = 100.75 Msgbox Round(val) ‘101 val = 100.25 Msgbox Round(val) ‘100 Msgbox … Read more

UFT Class 26

UFT Class 26 (VBScript Loop Statements Part-2, VBScript Functions Part-1) VBScript Loop Statements Part-2 I) For…Next II) While…Wend III) Do While / Until…Loop a) Using While keyword It repeats a block of statements while condition is True Syntax: 1) Do While Condition Statements ——— ———- Increment/Decrement Loop ——————- Example: OrderNo = 1 Do While OrderNo … Read more

UFT Class 25

UFT Class 25 (VBScript Conditional Statements Part-2, VBScript Loop Statements) Usage of VBScript conditional statements 1) Execute a statement when condition is True/Simple if. 2) Execute a block of statements when condition is True. 3) Execute a block of statements when condition is True, otherwise execute another block of statements 4) Decide among several alternates … Read more

UFT Class 24

UFT Class 24 I) VBScript Operators a) Arithmetic Operators: Arithmetic Operators return value based result. ————————— 1) Exponentiation ^ 2) Multiplication * 3) Division / 4) Integer Division \ 5) Modules mod 6) Addition 7) Subtraction 8) Concatenation ———————- Example: Dim a, b, c a = 10 b = 3 c = a ^ b … Read more

UFT Class 23

UFT Class 23 (VBScript variables, Operators-1) III) VBScript Variables 1) What is Variable? A named memory location to store the data. Two types of Memory in Computer Environment: i) Primary Memory – RAM ii) Secondary Memory – HDD, DVD, USB drives etc… 2) Declaration of Variables Variables can be declared using either Public or Private … Read more