Hi Priyanka,
As per my understanding you want to select the last row from a table.
Here i am giving the code segment.If it works try this
intRowCount=SwfWindow(““).SwfWindow(““).SwfTable(““).RowCount
intCounter=1
For intCounter=1 To intRowCount
If intCounter=intRowCount
SwfWindow(““).SwfWindow(““).SwfTable(““).SelectRow
"intCounter----This is the last row number
Exit For
End If
Next
Let me know ,If you want any further clarification.
Thanks
Sridhar
On 10/30/09, Priyanka <[email protected]> wrote:
>
>
> I'm using QTP on window based application with.NET properties.
>
> In my application whenever I add a "New customer name" it gets added
> at the end of the row.
>
> Recording Mode: While recording I've generated the script to "Create
> new customer" and edit the same but QTP recording the whole script by
> row number.
> Below is the script for better understanding
>
> SwfWindow("").SwfWindow("").SwfTable("").SelectRow "0"
> SwfWindow(““).SwfWindow(““).SwfTable(““).ExpandRow "0"
> SwfWindow(““).SwfWindow(““).SwfTable(““).ActivateRow "0;18"
> SwfWindow(““).SwfWindow(““).SwfTable(““).SelectRow "0;18"
> SwfWindow(““).SwfWindow(““).SwfTable(““).ExpandRow "0;18"
> SwfWindow(““).SwfWindow(““).SwfTable(““).ActivateRow "0;18;5"
> SwfWindow(““).SwfWindow(““).SwfTable(““).SelectRow "0;18;5"
>
>
> Requirement for run mode:
>
> I've set the data parameter to auto generate the new customer for each
> iteration. But my problem here is that after creating a new customer
> from data, QTP is always clicking on the same recorded row. Whereas I
> want QTP to click always on the last name of the row.
>
> Can anyone help me to understand how can I set my script to click on
> the last value of the row. Few people have suggested me before to use
> regular expression but my requirement here is that QTP should not only
> recognized but it should also click and edit the last value in the
> row.
>
> Please do not hesitate to ask again, if I am not very clear in my
> question .
>
> Many thanks.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---