Forum Discussion

SmartBST's avatar
SmartBST
Contributor
7 years ago
Solved

Click a string variable

Hi have created a variable string for an order # and i need to selected to be able to deleted.   How can I complete that .     Thank  you.
  • SmartBST's avatar
    SmartBST
    7 years ago

    record the action to delete the variable. 

  • tristaanogre's avatar
    tristaanogre
    7 years ago

    SmartBST wrote:

    Hi Robert

     

     

    Is a select control


     

    Typically, a select control will have a method called "ClickItem".  

     

    If I were to write it as code, I'd do something like this:

     

    var orderNumber = '12345';
    
    Aliases.MyApp.myForm.mySelectControl.ClickItem(orderNumber);

    For a text box, it's simply a matter of passing the variable to either the "Keys" or the "SetText" method.

     

    var orderNumber = '12345';
    
    // Keys method
    Aliases.myApp.myForm.myTextBox.Keys(orderNumber);
    
    //SetText method
    Aliases.myApp.myForm.myTextbox.SetText(orderNumber);

    If you're using Keyword Tests, the concept is the same.  When you select the appropriate method on your control (any one of the above 3 as described) you're prompted to enter the parameter value.  If you click the ellipses beside the parameter, you will bring up an edit window.

     

     

     

    This will allow you to select the mode of "Variable" and select which variable you want to use. This will work for ClickItem, SetText, or Keys.