Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Description.Create with same propertie and different values, not working
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
Hello,
I want to count the number of WebElements with the propertie "innertext" and the values "Blue Skies Airlines 360" AND "Blue Skies Airlines 361". On my AUT there are two of these objects on my page.

This is my QTP code:
----------------------------------------------------------------------
Code:
Set flight=Description.Create()
flight("micclass").value="WebElement"
flight("innertext").value="Blue Skies Airlines 360"
flight("innertext").value="Blue Skies Airlines 361"
flight("html tag").value="B"

set nflights = Browser("name").Page("title").ChildObjects(flight)
msgbox "Number of flights: " &nflights.Count
----------------------------------------------------------------------

I run with the "Run one iteration only" option.

The number of flights QTP returns is 1 and not the expected 2.
What i am doing wrong?
(i think i have to build in a loop, but i cannot get it ok)
Reply


Messages In This Thread
Description.Create with same propertie and different values, not working - by ttralor - 01-07-2013, 08:16 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to create List box in excel sheet at Run time with values yes No JACKSPARROW 0 1,736 01-17-2017, 11:05 AM
Last Post: JACKSPARROW
  How to find out the object property in the Description language . njnirmal 9 6,733 05-19-2015, 12:30 AM
Last Post: qtptester66523
  Error while creating object using description.create object in VB script SarodeGirish 5 6,321 06-19-2012, 05:30 PM
Last Post: ssvali
  Problem while adding description of an object using a varibale shibinp 2 3,474 08-25-2011, 10:51 AM
Last Post: shibinp
  descriptive programming- object description vnicey 3 4,705 11-24-2010, 01:02 AM
Last Post: Anu123

Forum Jump:


Users browsing this thread: 2 Guest(s)