Forum Discussion

fullbeats's avatar
fullbeats
Occasional Contributor
10 years ago

Let the user pick a variable?

Hello,

 

I was wondering if there is any "user-friendly" possibility to let a user pick a variable when using one of my custom keywords.

Is it possible - for example - to get access to the built-in editor-dialog similar to the one in the pic?

Thanks a lot in advance!

Variable Editor

    • fullbeats's avatar
      fullbeats
      Occasional Contributor

      Exactly, I want to develop a script extension to provide a custom keyword.

      There will open a custom user form OnSetup of the keyword. The user can choose some options in this user form - including the selection of a variable / Excel cell.


      Your thread was very helpful for me - though I have some issues why these solutions don't work for me:

       

      • I can't make use of the "parameter solution" because I need to trigger the variable/parameter editor from my custom user form. When I implement the parameter solution, I get this editor always at the end of my OnSetup-method, when it returns true. (https://support.smartbear.com/viewarticle/68119/)
      • And I've got problems to use your approach because I also need to access table data (from an Excel file).

       

      So I'm in the unlucky position to need "the best of both worlds":

      • the independent way, that lets you pick the variable at any point in your script (and not just at the end, when "true" was returned)

      AND

      • the support by TestComplete built-in components to access Excel data in a convenient way (in other terms: avoid the use of ExcelDriver because the user has to select it)

       

      I hope, this helped to clarify my problem - if not, please ask!
      I would appreciate it if someone has seen a solution for this or can think of a workaround. :-)

  • The user can pick variables like this in many places.  It would help if you show us an example of where you want to use it.  

  • If we want to create a custom keyword operation and want to use a user form than there is no way that we can access the Keyword parameter dialogue from that form.

    This is required while creating some functionality where we need to use the user forms but the components/parameters in the user form can be of different type.In that case default keyword parameter dialogue/window will be helpful.