If you want to use the OR feature then you have to go for Action only. A function is just lines of code with some/none parameters and a single return value while an action can have more than one output parameters. Action can have a object repository associated with it while a function can't. Reporter.Filter = rfEnableAll 'Enable all the reporting events like Pass or even FailĦ# What is the difference between an Action and a function?Īction is a thing specific to QTP while functions are a generic thing which is a feature of VB Scripting. Reporter.Filter = rfDisableAll 'Disables all the reporting events like Pass or even Fail The below mentioned code generates a random number in the range of 100-999:ĥ# My test fails due to checkpoint failing, how can I see the result of my checkpoint without affecting my test case to checkpoint failure? In the above mentioned code, a Boolean value is returned to the variable chk_PassFail. "if chk_PassFail" means if chk_PassFail="True". If no error is there, then Err.number = 0ģ# How to know if my checkpoint passes or not?Ĭhk_PassFail = Browser(.).Page(.).WebEdit(.).Check (Checkpoint("Check1")) ObjIE.Navigate 2# How to check if a parameter exists inside the DataTable or not? But if we want to directly place the URL in the above mentioned code, replace the third line with the below mentioned line: Here the URL specified in the Environment file will be navigated. Set objIE = CreateObject("InternetExplorer.Application")
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |