Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Labels and other objects w/ descriptive programming
#2
Not Solved
Hey Juan, I don't have any good answers for most of those questions but I do see something in #1 that you are doing in a very inefficient manner. The Description object can take more properties than just "micclass." If you add the "name" property, the ChildObjects method will only return those objects that match the specified "micclass" and "name" saving you TONS of loop time. If you give it the "name" property, and if it is valid HTML on the page, it will only return one object. I would suggest adding html tag as well, but it's not necessary.

Code:
Set oDescription = Description.Create()
oDescription("micclass").Value = micClass
oDescription("name").Value = sDTControlName
'add html tag if you can -->
'oDescription("html tag").Value = "TD"

Set oObject = oBrowser.ChildObjects(oDescription)

If oObject.Count = 1 Then
     oObject.Item(0).Set sDTControlValue
ElseIf oObject.Count > 1 Then
     Reporter.ReportEvent micFail, "Set Custom Object Value", "Object description is not unique"
Else
     Reporter.ReportEvent micFail, "Set Custom Object Value", "Object not found"
End If
Reply


Messages In This Thread
RE: Labels and other objects w/ descriptive programming - by cdesserich - 01-20-2011, 11:29 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Dynamic descriptive Programming issue in Terminal Emulator cprasad 1 1,761 04-25-2019, 08:17 PM
Last Post: Ankur
  UFT Tool support with Descriptive programming laks 1 1,648 07-05-2018, 05:31 PM
Last Post: Ankur
  UFT Descriptive Programming objects not identified in a secure & private intranet env bugfinder2 1 1,676 06-07-2017, 01:41 PM
Last Post: Ankur
  UFT descriptive programming Browser("creationtime:=-1") not always working SOUMYADEEP 0 2,910 01-20-2017, 01:53 AM
Last Post: SOUMYADEEP
  Inserting variable values into Descriptive Programming Functions eske99 2 3,166 12-18-2015, 01:47 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)