Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Count gives wrong result
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi I am trying to count total no of weblist from the web page.
I have written following script.
But it gives result as 0.However there are 2 weblist present on the page.
Why it showing result as 0 ?

Code:
SystemUtil.Run"IEXPLORE.exe","http://www.google.com"
Set Butobj = Description.Create()'Forweblist
Butobj("micclass").value = "weblist"'For weblist
Butobj("html tag").value="select"'For weblist
Browser("name:=google").page("title:=google").link("innerhtml:=preferences").click
set collection=browser("name:=preferences").page("title:=preferences").childobjects(Butobj)
msgbox collection.count

Can anybody point the mistake ?
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,

Replace following
1.
Code:
Butobj("micclass").value = "weblist" WITH  Butobj("micclass").value = "WebList"
2.
Code:
Butobj("html tag").value="select" WITH  Butobj("html tag").value="SELECT"

Now it is giving count as '2'
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Thanks a lot tariksheth. Its giving proper result now.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Childobject return wrong checkbox count.. VpnQTP 1 2,845 04-09-2015, 09:07 PM
Last Post: babu123
  wrong code execution pkdhake 4 3,735 07-27-2013, 12:19 PM
Last Post: sreekanth chilam
  Wrong count for UsedRange rows and columns in datatable. qtpexpert 2 6,371 06-20-2012, 04:35 PM
Last Post: qtpexpert
  QTP gives wrong value through GetRoProperty rahul3tech 2 3,998 02-03-2012, 10:14 PM
Last Post: rajpes
  How to retrieve test result summary from a test result window using dp? jyotikrushna 3 5,246 09-30-2011, 09:24 AM
Last Post: rajpes

Forum Jump:


Users browsing this thread: 2 Guest(s)