Results 1 to 5 of 5
  1. #1

    HTML web tables on the page

    I am facing very weird problem, when I execute below lines of code on one M/C it returns total number of web tables present on the web page (Say 150) , but when I do same on another it returns 1.
    I have checked all the QTP settings on both the machine, both are exactly same.

    Set ObjPageTable = Description.Create()
    ObjPageTable("html tag").Value = "Table"

    Set TableObjLists = Browser("Browser").Page("Page").ChildObjects(ObjPa geTable)
    NumberOfTables = TableObjLists.Count

    msgbox NumberOfTables

    Can any one help me.??

  2. #2
    Join Date
    Jun 2002
    North Oaks, MN, USA

    Re: HTML web tables on the page

    Sounds frustrating.
    Maybe one of these comments will help.
    What happens if you change your descriptor property to something that should be equivalent, say ObjPageTable("micclass").Value = "WebTable"?
    It may be some environmental factor outside QTP that causes an alteration in the page structure such that the 150 tables appear to be children of one table, instead of children of the page.
    What does the table structure look like with Object Spy? Finding every table with Object Spy is partly a matter of luck, but you might hit something revealing.

  3. #3

    Re: HTML web tables on the page


    How about checking your browser settings? Make sure everything is exactly the same.

    As a test you could try something like this. See what it returns on both machines.
    j = 0
    For i = 0 to 200
    If Browser("Browser").Page("Page").WebTable("index:=" &i).Exist(0) Then
    j = j+1
    Exit For
    End If

    MsgBox j
    (I'm hiring Software Development Engineers in Test in Seattle, WA)

  4. #4

    Re: HTML web tables on the page

    On 2nd thoughts, I think it's your property "html tag" that might be causing the problem. Try using some other identifier property.
    (I'm hiring Software Development Engineers in Test in Seattle, WA)

  5. #5

    Re: HTML web tables on the page

    Hey Mark that worked thanks for your help



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 03:35 PM.

Copyright BetaSoft Inc.