QTP not identifying the webedits

Hi,

I am able to see the 6 webedits under the table in the application,

But when i count the number of webedits(through scripting) it is giving me the count as 3 webEdits.

I also tried to count using webedits property("visible") then also it is giving the same count.

Though i object spy all the webEdits under that table i found the visible property is true for all 6 webedits.

also i cannot validate field by field as there is no unique property for webedits so i came up with the solution of Parsing the Table and counting Webedits.

Code which i wrote is;

Set oWebEdit=Description.Create
oWebEdit("micclass").value="WebEdit"
set objList=Browser("SuccessFactors Log in").Page("SuccessFactors: Employee_2").WebTable("phoneinfo").ChildObjects(oWebEdit)
For i=0 to objList.count-1
Dim p:p=objlist(i).getROProperty("visible")
If p="True" Then
c=c 1
End If

Next
Msgbox c

Kindly suggest

Parents
  • Hi,

    Are all six webedits highlighted if you use Object Spy? Is the problem that they cannot be uniquely identified by their current scope of properties?

    A suggestion could be to use the 'Visual relation identifier' (VRI) in the Object Repository. All of the six webedits have corresponding webtext objects ('Phone Type,' 'Country Code', 'Area Code' etc.) above them. If you add the aforementioned webtext objects, you can use VRI to locate the nearest webedit below the current webtext object.

    Example: Add the 'Phone Type' webtext object (this will be unique) and a dummy webedit object (not unique). Use VRI on the webedit object and specify that the object is below and the nearest of the 'Phone Type' webtext object.

    Good luck!

  • OM_H gave a good advise.

    However, I think before you go for VRI, you may want to try ordinal identifier and see if that is working

    Browser("SuccessFactors Log in").Page("SuccessFactors: Employee_2").WebTable("phoneinfo").WebEdit("index:=2").Highlight

     Just change the indices (starts from 0) there to highlight different edit boxes. IMHO VRI, would be slower in comparison to ordinal identifier. 

     

Reply
  • OM_H gave a good advise.

    However, I think before you go for VRI, you may want to try ordinal identifier and see if that is working

    Browser("SuccessFactors Log in").Page("SuccessFactors: Employee_2").WebTable("phoneinfo").WebEdit("index:=2").Highlight

     Just change the indices (starts from 0) there to highlight different edit boxes. IMHO VRI, would be slower in comparison to ordinal identifier. 

     

Children
No Data