Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP Script - Doubt regarding moving the control to a specified line
#1
Solved: 11 Years, 5 Months ago
Hi,
I am using VB script in the QTP. I am a beginner. I need help in knowing the command that is used to move the control to a specified line number. For ex say going to a step 10 lines before the current line or 10 lines after the current line. Please help.

Thanks,
Nataraj.R
Reply
#2
Solved: 11 Years, 5 Months ago
Try Ctrl+G to jump to a Specified Line
Reply
#3
Solved: 11 Years, 5 Months ago
Thanks for your reply Surya. I am writing the script in the expert view and i want to know if there is any command that can be written manually so that when i run the script, after a particular step the control passes on to the specified nth step and if it proceeds from there. I dont know what i am telling is either correct or if it is possible.
Reply
#4
Solved: 11 Years, 5 Months ago
Use Goto.

See the QTP help
Reply
#5
Solved: 11 Years, 5 Months ago
Hi Surya , What Nataraj is telling that, while running the script can we jump from one line and ask QTP to goto a particular line? Like "goto" statement in "C" language. Unfortunately there is no facillity in Vbscrpt and QTP. Instead of it you can use If else statement and Select statement
Reply
#6
Solved: 11 Years, 5 Months ago
Yes Prince, that is what i meant. I am having a set of values in the data table which i am calling through the script using the following statement:
Code:
If datatable.Value("English", dtGlobalSheet)="Save"
Then
    Browser("Browser").Page("Page").WebButton("Save").Click
DataTable.SetNextRow
End If

If datatable.Value("English", dtGlobalSheet)="Back"
Then
    Browser("Browser").Page("Page").WebButton("Back").Click
DataTable.SetNextRow
End If

By using this i am calling the values of the next next rows continously. If i use the same in the loop, the last value that will get set will be Back. So my QTP looks for this particular word Back instead of Save which i used it in the previous If condition. I can very well use

Code:
DataTable.SetPreviousRow

to set the value for Save. But the same will become too complex when there are suppose say 10 buttons in the next next row of data table. So i wanted an alternate way of doing that. Is it still possible to use If else and Select statements?
Please help.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Fifth word from every thousand line in notepad files. sallu.iet@gmail.com 0 979 01-17-2020, 09:58 AM
Last Post: sallu.iet@gmail.com
  Grab multiple line data from log file haziqwebs 0 1,822 10-19-2016, 01:28 PM
Last Post: haziqwebs
  Driver Script to control child scripts sumanhyd 1 3,223 07-26-2016, 07:06 PM
Last Post: Ankesh
  Automate BMC Control M applications using QTP Saranyaciet2 0 2,851 05-22-2015, 09:43 AM
Last Post: Saranyaciet2
  doubt on webedit ramuvasavi 1 1,915 03-10-2014, 12:35 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 2 Guest(s)