Forum Discussion

RemcoKok's avatar
RemcoKok
Occasional Contributor
3 years ago

Data-driven Keyword testing, Selecting dropdown menu in fat client

Is it possible to make a Data-driven Keyword test, that will go through my fat client dropdown menu with clicks to open the client Windows?

I've recorded the clicks and I have a name mapping for the dropdown menu items, but I don't know how I can make these Object clicks variable?

 

 

  • ok I'm guessing that the lines like this are the ones you want to read data for, and the part following LWComponent is what is changing

    Aliases.browser.BufferedFrame_new.LWPopupMenu.LWComponent.InpmngvpRegRegvpmldWAZO

     

    Define a string variable that holds Aliases.browser.BufferedFrame_new.LWPopupMenu.LWComponent. plus the variable from the ddt that you want to use.

     

    The contents will look like Aliases.browser.BufferedFrame_new.LWPopupMenu.LWComponent.InpmngvpRegRegvpmldWAZO

    but it's a string and not an object

     

    When you want to use it as an object, then you need 

    eval(stringvariable)

     

    By putting the ddt variable in the string, you'll be able to use each value as it loops through the test.

     

    Try it and let us know if you have more questions!

     

6 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Do you just want to click each of those in order in your test, or do you want to read the menu entry from a file and click on the one that it read?

    • RemcoKok's avatar
      RemcoKok
      Occasional Contributor

      I want to click on the dropdown menu items, while reading the menu items from a list (= Excel file). This should be done in order, because every menu item can contain a new dropdown list, before the menu item will open a screen.

      It works when I record the test and execute this test, but I want to use Datadriven test to open all screens of the application.

      Hopefully this is possible in Testcomplete...

       

       

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        Okay, show me one line of the test where you recorded it and were choosing the dropdown and I can give you an example of it with DDT.