Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problems with ChildObjects
#1
Solved: 11 Years, 4 Months ago
Hi,
i don't understand this behavior: i have a page with many links and I use ChildObjects with this description:
Code:
Dim descrLink, objLink, NoOfLink
Set descrLink = Description.Create()
   descrLink("Class Name").value="Link"
Set objLink = pag.ChildObjects(descrLink)
NoOfLink = objLink.Count

msgbox NoOfLink
Set descrLink=nothing
Set objLink=nothing

[pag is a Page Object].
If I run many times this code, NoOfLink is not always the same number...
1. Why?
2. Which is the difference between "Class Name" and "micclass"?
3. In my page I have more links than NoOfLink...
Reply
#2
Solved: 11 Years, 4 Months ago
ok,
problems of page loading... I supposed that "pag.Sync" was sufficient... now I have added a "wait(20)" and I obtain always the same number of links :-)
Reply
#3
Solved: 11 Years, 4 Months ago
Sync function doesn't work in DP so instead of Sync use Wait(). Or use below code

Code:
Set IE = CreateObject("InternetExplorer.Application")
while IE.busy
wend
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problems with Text color recognition Treirk 0 1,102 06-17-2019, 12:19 PM
Last Post: Treirk
  Problems with URL as Object identifier??? jcraig26 1 3,352 02-27-2013, 05:06 PM
Last Post: anil2u
  QTP recording problems Masa 2 2,443 11-11-2012, 08:28 AM
Last Post: Masa
  problems with remote machines locking or going to sleep usha gowda 3 3,663 10-15-2012, 11:36 PM
Last Post: agarwl.anurag
  Problems running many drivers I.software 1 2,069 03-02-2012, 02:48 PM
Last Post: sshukla12

Forum Jump:


Users browsing this thread: 1 Guest(s)