Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Enter new value from datatable in web edit
#1
Solved: 11 Years, 4 Months, 3 Weeks ago Toungue 
I want enter value in web edit by using qtp. i have written script but when i was run this script again and again value will changed means i want new value in web edit, this changeable value i want enter from data table.

For Ex:

i was run script 1st time in web edit value = 1
when i was enter value 2nd time 1st value is used that's why i want change this value means enter new value when i was run this script
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi,

you can enter the data in any of the data sheets available in data table and use the DataTable.Value(Parameter_ID,Sheet_ID) to call those values.

If you have qtp installed check help for more info.

Hope this helps

Anil
Reply
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
Thank you sir for reply to my query but i was used qtp data table which is available in qtp. and i want enter value from this data table. could u please tel me how can i use data sheet. (see my attachment file)

i will definitely check qtp help


Attached Files Image(s)
   
Reply
#4
Solved: 11 Years, 4 Months, 3 Weeks ago
What I could get from your screenshot is you are trying to read the values from the table and if the value is equal to some "text string" then you will run the test case. Hope I got this right.

For this you need to set the current row before you retrieve the value from data table not after retreiving or else use setNextRow at the end of the for loop as below:
Code:
row_count=DataTable.GetRowCount
For i=1 to row_count
   DataTable.SetCurrentRow(i) '*Sets the pointer to the ith row of the excel sheet*'
   temp=DataTable.Value("No","Global") '*Its advisable to use the sheetId or sheetName for better reading*'
   If temp="text string" then
      ***your steps***
   End If
   DataTable.SetNextRow '*Do not use this if you are using setCurrentRow method*'
Next

Hope this clarifies
Thanks
Reply
#5
Solved: 11 Years, 4 Months, 3 Weeks ago
its working in my script. now i am working properly on my project.

Thank You sir.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Not able to set value in application web edit box tanuj dewangan 4 3,773 07-29-2016, 03:58 PM
Last Post: harshadevadas
  Unable to pass "Enter" Key through Sendkeys Lavanya N 1 4,199 07-24-2015, 02:17 PM
Last Post: Lavanya N
  Edit Recovery Scenario skegler 0 3,302 03-05-2014, 10:40 PM
Last Post: skegler
  Not able to edit existing scripts in QTP 11 prit deo 1 4,087 02-14-2014, 11:20 PM
Last Post: supputuri
  How to enter values into excel which is already open using QTP Narayanan 1 4,444 12-11-2013, 07:30 AM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 2 Guest(s)