Forum Discussion

Everseeker's avatar
Everseeker
Contributor
10 years ago

Want to DataDrive a check property

I have the following bit of code:

5.jpg

'Main Loop

  While Not Project.Variables.SearchPanelLoop.IsEOF

    '(Pick a Task) Double-clicks the KeywordTests.LoopedNavigation.Variables.SearchPanelLoop("Selection") item. 

    Call Aliases.Samtec_ShopFloorControl_AppHost.TaskManagerForm.WindowDockingArea1.DockableWindow1.TaskSearchPanel.TaskListView.DblClickItem(Project.Variables.SearchPanelLoop.Value("Selection"))

    '(Check the Task) Checks whether the 'Exists' property of the Page called up equals True.

    Call aqObject.CheckProperty(Project.Variables.SearchPanelLoop.Value("Control"), "Exists", cmpEqual, True)

    'Right Click on the Tab

    Call Aliases.Samtec_ShopFloorControl_AppHost.TaskManagerForm.MdiTabGroupControl.ClickR(37, 10)

    'close the tab

    Call Aliases.Samtec_ShopFloorControl_AppHost.TaskManagerForm.MdiTabGroupControl.PopupMenu.Click("[0]")

    Call Project.Variables.SearchPanelLoop.Next

  WEnd

 

And the following object

 1.jpg

I have a set of them all in excel, as here:

 2.jpg

 

The Plan SEEMS straightforward enough, and I was able to set it up in the Keyword Interface (Moved to script so I could paste it here. The error is the same, either way)

Anyway, the plan is:

Click on Selection

Check to see if the correct page now exists & report

Loop

 

But I get:

 3.jpg

 I assumed that I SHOULD be able to data drive this, because, in the Keyword view, I can specify exactly this thing:

 4.jpg

So, what am I missing?

 

 

  • Marsha_R's avatar
    Marsha_R
    10 years ago

    try  

     

    Call aqObject.CheckProperty(eval(Project.Variables.SearchPanelLoop.Value("Control")), "Exists", cmpEqual, True)

  • Improved readability of code...

    'Main Loop

      While Not Project.Variables.SearchPanelLoop.IsEOF

        '(Pick a Task) Double-clicks the KeywordTests.LoopedNavigation.Variables.SearchPanelLoop("Selection") item. 

        Call Aliases.Samtec_ShopFloorControl_AppHost.TaskManagerForm.WindowDockingArea1.DockableWindow1.TaskSearchPanel.TaskListView.DblClickItem(Project.Variables.SearchPanelLoop.Value("Selection"))

        '(Check the Task) Checks whether the 'Exists' property of the Page called up equals True.

        Call aqObject.CheckProperty(Project.Variables.SearchPanelLoop.Value("Control"), "Exists", cmpEqual, True)

        'Right Click on the Tab

        Call Aliases.Samtec_ShopFloorControl_AppHost.TaskManagerForm.MdiTabGroupControl.ClickR(37, 10)

        'close the tab

        Call Aliases.Samtec_ShopFloorControl_AppHost.TaskManagerForm.MdiTabGroupControl.PopupMenu.Click("[0]")

        Call Project.Variables.SearchPanelLoop.Next

      WEnd

     

     

    • Marsha_R's avatar
      Marsha_R
      Moderator

      try  

       

      Call aqObject.CheckProperty(eval(Project.Variables.SearchPanelLoop.Value("Control")), "Exists", cmpEqual, True)

      • Everseeker's avatar
        Everseeker
        Contributor

        [Since this is actually a new question, I am opening it in a new thread, so credit for a solution can be given]

         

        New Thread

  • Alright, I have a couple of suspects:

    1 -  Call aqObject.CheckProperty(Project.Variables.SearchPanelLoop.Value("Control"), "Exists", cmpEqual, True)

    (try removing the "Call");

    2 - If the first doesn't work, put a break point at the problematic Checkpoint, add a watch to the "Project.Variables.SearchPanelLoop.Value("Control")" and send the picture variable value.

     

    Hope this helps,

     

    Leandro de Araújo Souza