Forum Discussion

Everseeker's avatar
Everseeker
Contributor
10 years ago

Property checkpoints not being handled correctly

The addition of Eval() did indeed resolve an issue referred to here:  Link to other Thread.
However, the solution gives me pause.
I did NOT simply pull the referenced code out of thin air. What I did was:
 
1. In KeyWord view, recorded the sequence, with 4 different page load/verification steps
2. Hand made an excel table with the required data
3. Changed the script to data driven, adding the double-clicked part in the data driven wizard
4. Pulled up the operation parameters for the Property Checkpoint.
5. Opened the parameter table for the Object
6. Changed Mode to Table Data
7. In the Value dropdown, selected Control
8. The value field saved as KeywordTests.Looper.Variables.TestData("Control")
9. OK/OK/remove now redundent parts of keyword script
10. Script fails on run... odd...looks right.
11. Converted to script view... As was pointed out, it needs Eval...
 
So, it seems to be the case that the Keyword test is NOT evaluating the table data... and that is NOT what I would expect. Am I wrong?
and, how do I resolve the issue?

    • Everseeker's avatar
      Everseeker
      Contributor

      2015-06-10_13-42-43.jpg

      Well, This is the window that pops up. It shows all the options available to me in the Keyword test view.(DB Table is MIA)

      And, when I select Table data, I get this:

      2015-06-10_13-46-28.jpg

      showing that it IS evaluating the excel table and loading the variables correctly...

      • joseph_michaud's avatar
        joseph_michaud
        Moderator

        I think the issue is that your Excel spreadsheet contains two columns of text.  The CheckProperty() method wants an Object as its first parameter.  You may read the text description of the object from the "Control" column, but it is not an Object (or at least not the object you are expecting) and there is no automatic type conversion that happens under the covers.

         

        The eval() converts that text description into the desired object in the context of your test run.