Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using Conditional Statement on O/P Parameter b/w QC BPT Components
#1
Solved: 10 Years, 8 Months, 3 Weeks ago
Hi All,

I have been working with QTP for sometime. Recently we have been asked to move all our script to QC BPT. As i am very new to BPT i am not sure how to do the below task.

Till now we have been writing scripts using function. We use to return True/False value to function and in the script we chek for the return value. If the return value is False the script will exit the iteration. I am finding it difficult to achieve in BPT. i created a component with a output parameter which returns True/False. I want to make use of this parameter as a conditional statement to call other component. how is that possible?

Let me give one example..

Component1 --- "BPT LOgin" - this has an output parameter as return.

once the execution is done, i need to check the output parameter value.. something like

Code:
if Parameter("Return")=False then
'Call to logoff Component and exit
Else
'Perform some operation
End IF

Please help me achieve this.

Thanks,
Ankesh
Reply
#2
Solved: 10 Years, 8 Months, 3 Weeks ago
Ankesh,
For this scenario what you can do is - in BPT component which is used for login ,there itself you check whether the login is successful or not by putting if condition and if not exit.No need to pass the values between components.
Reply
#3
Solved: 10 Years, 8 Months, 3 Weeks ago
Thanks Shridevi!!!

Okay, Got a solution for the issue.

I am now using the command - "ExitComponentIteration" inside the component whenever error occurs and it is working fine.

So no need to use any conditional statement. Script will automatically come out of the component.

Regards,
Ankesh
Reply
#4
Solved: 10 Years, 8 Months, 3 Weeks ago
Np. I was referering to the condition statement to check whethere a test case is pass or fail.:-)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Business Components Parameterization YogeshCallappa 0 1,504 06-07-2017, 04:32 PM
Last Post: YogeshCallappa
  Problem Firing events on Flex components endpoint 0 2,192 09-10-2014, 06:52 PM
Last Post: endpoint
  Action Parameter passing problem Qtpuser1 1 2,708 04-18-2014, 06:23 AM
Last Post: kgovadav
  Parameter bistritapcv 0 2,242 04-02-2013, 09:10 PM
Last Post: bistritapcv
  Parameter iteration bistritapcv 1 3,210 03-28-2013, 10:40 AM
Last Post: Sathiya

Forum Jump:


Users browsing this thread: 1 Guest(s)