Object Identification with Runtime DP
I've looked around the forum for this, but can't seem to find quite the answer to my problem. First, the code (FYI: TopPage, mkFrameCompleteTime, and WaitForObject are all defined and functioning):
<font class="small">Code:</font><hr /><pre>
Set desc = Description.Create
desc("html id").Value = id
desc("attribute/url").Value = "http://www.example.com/examplepage.aspx?PageInstanceId=" & match
Set oFrame = TopPage.Frame(desc)
If WaitForObject(oFrame) Then
For i=1 to mkFrameCompleteTime*10
readyState = oFrame.Object.readyState
On Error Resume Next
If Err.number = 0 Then
I'm working with a tabbed UI that keeps tabs loaded in the background by using frames stacked and accessed with z-index. In fact, there are multiple sets of stacked frames. I'm trying to use DP to pull up the correct frame. A regexp, not shown, pulls up the match variable, which is just a unique id, and appends it to the end of the url.
Now, if I comment out the attribute/url line, I get 3 matches if I call oFrame.count. However, when that line goes in, I get 0. Furthermore, I checked the ROProperty url for the 3 matches, and the last one matches the URL being dynamically searched in attribute/url! Clearly, something's the matter with my methodology...any help is appreciated.
Re: Object Identification with Runtime DP
By default the Description.Create object treats all the values(of properties) as regular expression so you have to turn off the regular expression for each property that you add.
Add this code
desc("attribute/url").RegularExpression = False
If it doesn't work then change "attribute/url" to "url" and see.
Or you can try this
[ QUOTE ]
I get 3 matches if I call oFrame.count.
[/ QUOTE ]
For I = 1 to oFrame.count