Forum Discussion

gdave's avatar
gdave
Regular Contributor
8 years ago

DDT Excel Driver in Keyword Test

Hi all

 

I am usinng DDT ExcelDriver in my keyword test to read an excel file saved on my desktop. However, I am not sure how to proceed to next step ie: I want test complete to verify that ISIN : GB00B2PB2C75 exist. I have attached the spreadsheet for your reference.

 

So far I have used call object method, used DDT from Select Runtime Object screen, Method used as ExcelDriver and following Operation Parameters entered:

ExcelFile: C:\Users\gd1\Desktop\Pending Purchase Report.xlsx

Sheet: 1

UseACEDriver: True

 

But not sure how do I proceed to next step and what should I use in order for it to verify ISIN : GB00B2PB2C75 from the spreadsheet.

 

Any help will be much appreciated. Thanks



Regards

G

  • The following screenshot is the logic you should be running with.   The outlined if--then is where you need to add your "Else" clause to report that the requested text is found.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Rather than using the Call Object method for creating the DDT object, there is a Data-Driven Loop operation built into keyword tests under the Test Actions grouping.  Generally, it works the same way as the DDT.ExcelDriver.

     

    What you would do is drop that action into your keyword test, specify the parameters for your excel sheet, and then add operations under that loop operator to check the value of the desired column in your spreadsheet against the desired test value.  When that value is found, you can log it.

    • gdave's avatar
      gdave
      Regular Contributor

      Thanks for the reply.

       

      Can you please advise what operation would I add under that loop operator to check the value of the desired column in the spreadsheet against the desired test value ? And how do I log it ? Thanks

       


      Regards

      G

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Basically, use an If--then operation to check the value of the data field and compare it to the desired value.  if that condition is met, use a Log operation to log the message.