1

I want to use my Local Data Table as a dynamic source that I can add an unknown set of rows into. Is that doable?

The goal is to just attach it as a driver to the loop that needed to load data from an excel sheet that contains a subset of our master data variables. (200 possible test variables but for testing a specific section of the code we only need to twiddle 3 bits.

I could use an array, but this needs to be maintainable by untrained UFT testers when I'm gone. Easiest way is to create the list on the fly depending on the content of the data driver sheet.

Motti
  • 110,860
  • 49
  • 189
  • 262
Jan D
  • 51
  • 3
  • I can't find a tag for uft-api (to differentiate from uft-gui testing.) Thoughts? – Jan D Jan 17 '17 at 09:16
  • Maybe I don't fully understand your question but can't you just ask the testers to update the Excel file and load it into your datatable at runtime? – Zac Jan 17 '17 at 10:57
  • Check my [**answer**](http://stackoverflow.com/a/37706073/1652222) for similar question. You may have to edit SQL part to suit your needs. – ManishChristian Jan 17 '17 at 18:53
  • Sorry -- Been flat out trying to get ready for deployment. Finally found a way to work it, but had to create a "blank" localDataTable long enough that it could support changes to every single data element on the form (197). Then, as I read in one of the 349 already written driver sheets, I capture the parameter names (column headings) from the excel with out headers, and store them in the local table. When I hit a blank heading, I set my total rows for the parameters. Thanks for the feedback! Zac - We have a library of excel sheets for regression testing. Touching them isn't an option. – Jan D Jan 30 '17 at 11:07

1 Answers1

0

You can attach dynamic an excel file, or you can use a step to populate a local data source.

In my case, I have one step called "Lookup" than load some registers from a web grid and populate the local data source of "Detail" step.

For Iterator = 1 To TestArgs("LookupIterations") Step 1
    If Browser("AWAT").Page("W").Frame("ipsToolbar").WebElement(getGridXpath(Iterator,3)).Exist(1) Then 
        DataTable.GetSheet("Detail").SetCurrentRow Iterator
        Datatable("RowId","Detail") = Iterator
        Datatable("FromType","Detail") = Browser("Water (AWAT) | IPS").Page("Water (AWAT) | IPS").Frame("ipsToolbar").WebElement(getGridXpath(Iterator,3)).GetROProperty("outertext")
        Datatable("FromID","Detail") = Browser("Water (AWAT) | IPS").Page("Water (AWAT) | IPS").Frame("ipsToolbar").WebElement(getGridXpath(Iterator,4)).GetROProperty("outertext")
        Datatable("ToType","Detail") = Browser("Water (AWAT) | IPS").Page("Water (AWAT) | IPS").Frame("ipsToolbar").WebElement(getGridXpath(Iterator,5)).GetROProperty("outertext")
        Datatable("ToID","Detail") = Browser("Water (AWAT) | IPS").Page("Water (AWAT) | IPS").Frame("ipsToolbar").WebElement(getGridXpath(Iterator,6)).GetROProperty("outertext")
    Else
        Iterator = TestArgs("LookupIterations") + 1
    End If
Next
Maurício Pontalti Neri
  • 1,060
  • 1
  • 10
  • 17