Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tabe in QTP script
#1
Solved: 10 Years, 8 Months, 4 Weeks ago
Hi

I have a requirement in my application to select some random values from the table. but every time when I run the script Iam getting errors.
so I used the table select row and column method and tried to retrieve the record but no luck the errors is as follows.

Code:
JavaWindow("Client System").JavaInternalFrame("GM_2").JavaTable("Table[]_2").SelectCell  "14","1"
error is (but there are no extra quotes or any thing in my code as it shows in the error.

"The statement contains one or more invalid function arguments.
line (297):
Code:
"javaWindow("Client System").JavaInternameFrame("GM_2").javaTable("Tabe[]_2.SelectCell "14","1'"'


Thanks
Reply
#2
Solved: 10 Years, 8 Months, 4 Weeks ago
Hi,

Row and column numbers are integers, don't specify them as strings. In the current scenario as you specified column as "1" (string), it's trying to identify the column with name as "1". Try the same LOC with integers.
Code:
'Column: The column number or column header label of the column containing the cell you want to select. Column numbers begin with 0.
JavaWindow("Client System").JavaInternalFrame("GM_2").JavaTable("Table[]_2").SelectCell 14,1
'Syntax with column name
JavaWindow("Client System").JavaInternalFrame("GM_2").JavaTable("Table[]_2").SelectCell 14,"FirstColumn"
Please let me know if you need any more information.
Thanks,
SUpputuri
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to execute the qtp script when this script is added to schedule tasks? venkatbatchu 3 5,309 10-08-2009, 03:19 PM
Last Post: venkatbatchu

Forum Jump:


Users browsing this thread: 1 Guest(s)