Hi,
Pl find the solutions...most probably I m correct
1. rw=Browser(XX).Page(XX).WebTable(XX).GetRowCount
cl=Browser(XX).Page(XX).WebTable(XX).GetColumnCount
For i=1 to rw
For j=1 to cl
data=Browser(XX).Page(XX).WebTable(XX).GetCellData(i,j)
If data="xyz" Then
counter=counter+1
End If
Next
Next
msgbox counter
2. Write DP for it
Set obj=Description.Create
obj("micclass").value="WebElement"
cnt=Browser(XX).Page(XX).ChildObjects(obj).count
For each a in cnt
a.GetROproperty("innertext")
On Thu, Jun 30, 2011 at 1:34 PM, Charan <[email protected]> wrote:
> Hello Experts !
>
> I have few interview qns in qtp that are generally asked....and want to
> resolve them. Please let me know if you know answer any of them :-
>
> 1. We have web table. In that some text suppose "xyz" is repeated in some
> cells randomly. How will you count the number of times that that text
> repeated in web table.
>
> 2. Suppose there are some elements in web page and index of the those
> elements is changing randomly. How will you handle this situation. I mean
> how to handle index of those elements.
> (we cannot use regular expression here)
>
> 3. In a flat file, suppose any string "computer" is repeated n number of
> times. how to count that.
>
> 4. How to execute only one action in test script and not all actions that
> are present. Is "Run Action ,Action name " will work for this.
>
> 5. If for an object, all the properties of that object are changing
> randomly, then how the qtp will identify that object ? .
>
> Thanks
> Charan
>
> --
> 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
--
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