Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to skip a step
#1
Solved: 11 Years, 4 Months, 4 Weeks ago
how to skip a step in QTP.
I am parameterizing Radio button. In that application by default first Radio button is selected.( Economy button is selected by default)
In the Global table i put the values of button as

1 Business
2 Economy
3 First.
Here after parameterizing the test it works well for first and third iteration.
But for second iteration as it is already selected it gives error.
I want to avoid the following step for second iteration because the radio button is already selected.

Code:
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebRadioGroup("servClass").Select DataTable("p_Value", dtGlobalSheet)
Reply
#2
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi Sudhir,
I hope in the RO Property "value" would help you. Check for the "value" property which,
when the first RadioButton in the group is selected, returns "#1"
when the Second RadioButton in the group is selected returns "#2"
when the first ThirdButton in the group is selected returns "#3"

Hence before going and selecting the particular webradiogroup get the ROProperty and go ahead.
i.e
Code:
If Not Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebRadioGroup("servClass").GetROProperty("value") = "#1" and Datatable.GetSheet("Global").GetParamenter("p_Value").Value = "Business"
then

Code:
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebRadioGroup("servClass").Select DataTable("p_Value", dtGlobalSheet)

........

Hope this would help in solving the error.
Reply
#3
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi Manoj,

I hope its a very lengthy way.

Just try out this way :


Code:
if (DataTable("p_Value", dtGlobalSheet)<>"Economy") then
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebRadioGroup("servClass").Select DataTable("p_Value", dtGlobalSheet)
  End if

Here if datatable value is not equal to "Economy" then it will take the value from datatable & select the radiobutton.
If datatable value is equal to "Economy" , it will not enter the " if " loop at all & continues with the next executable statements....so like this we have skipped the second step.

I hope you understood the solution...
Reply
#4
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi Shrekanth and Manoj,

Thanks a lot , both of your steps works.

I also need a hlep of a thread i posted as " Parameterization under parameterization"

Hope you guys help in in this regards.
Reply
#5
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi Sudhir,
I think using global and local sheet would solve the issue of "Parameterization under parameterization". If you are expecting anything else please do explain the scenario where and when is it required
Reply
#6
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi Manojith,
just take a example of Flight Reservation application.

In this first login with any user. Under this login parameterize the test for no of Flights dates.

Same test i want to run for multiple Login user.

Thanks in advance
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help for instruction to click on Skip button in the warning message vijilesh 0 1,556 09-16-2018, 03:48 PM
Last Post: vijilesh
  QTP does not record the first step of open filight reservation application. Blossoms 9 17,863 07-20-2015, 05:50 PM
Last Post: AJAJ
  step by step report shipu 0 2,192 08-06-2014, 02:21 AM
Last Post: shipu
  which is the final step of automation in QTP? Ramadas 6 3,994 10-29-2013, 04:31 PM
Last Post: Sathiya
  How to skip a For count? mv8167 2 2,533 10-23-2013, 07:06 PM
Last Post: mv8167

Forum Jump:


Users browsing this thread: 3 Guest(s)