Forum Discussion

DCat1223's avatar
DCat1223
Frequent Contributor
9 years ago

Create Dropdown box to use for Parameters

Good morning all...

Does anybody know of a way to create a dropdown box to use in a Keyword test?  What I am looking to have is a dropdown box listing several departments as parameters.  Based on the department selected, a variable would be populated with the selection and the test script would go to a specific coordinate to select the corresponding department.  If Dept X then click Coordinate X.  If Department Y then Click Coordinate Y...  Unfortunately I am forced to work with coordinates in this case because this test case is actually remoting a handheld device via a browser. 

 

I have uset the BuiltIn.InputBx but was wondering if there was a corresponding function for a ComboBox function.  It would be more appropriate in this case.

 

Thanks for your time!

 

Dave.

  • Hi Dave,

     

    For example, you may consider to implement User Form (https://support.smartbear.com/viewarticle/69674/) in your test...

    But note that in this case your test cannot be executed unattended (without additional coding to close the displayed User form) because the displayed User form must be processed manually.

    One more approach is to provide the needed parameter as either a command-line parameter (https://support.smartbear.com/viewarticle/72085/), the value of some configuration file, or as a value of the Project variable (which can be set from within TestComplete but from within TestExecute). The advantage of any option from the latter approach is that it makes it possible the tests to be executed unattended.

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi Dave,

     

    For example, you may consider to implement User Form (https://support.smartbear.com/viewarticle/69674/) in your test...

    But note that in this case your test cannot be executed unattended (without additional coding to close the displayed User form) because the displayed User form must be processed manually.

    One more approach is to provide the needed parameter as either a command-line parameter (https://support.smartbear.com/viewarticle/72085/), the value of some configuration file, or as a value of the Project variable (which can be set from within TestComplete but from within TestExecute). The advantage of any option from the latter approach is that it makes it possible the tests to be executed unattended.

    • DCat1223's avatar
      DCat1223
      Frequent Contributor

      Thanks, Alex.  I didn't even kow User Forms existed.  This should do the trick.  I appreciate your help!