Forum Discussion

ajb's avatar
ajb
Occasional Contributor
8 years ago
Solved

Would like to generalize a table comparison in VBScript

Working with VBScrip tScripting. I am trying to create a general purpose script to run my browses and compare the output.  Starting with:   Call Tables.SDTCode1.Check   I would like to use a p...
  • HKosova's avatar
    8 years ago

    You could use Execute to run code as string:

    strTableName = "SDTCode1"
    Execute("Tables." & strTableName & ".Check")

    Or something like this:

    strTableName = "SDTCode1"
    Set tblCheckpoint = aqObject.GetPropertyValue(Tables, strTableName)
    Call tblCheckpoint.Check

     

    Or if you want to compare the same table to multiple objects, use the CompareWithObject method instead of Check:

    Call Tables.SDTCode1.CompareWithObject(Aliases.MyApp.Object1)
    Call Tables.SDTCode1.CompareWithObject(Aliases.MyApp.Object2)