Entering Data

In this video, we will enter data to sample app from a DataRow in club members table.

The screen to enter is as following:

You will learn the following techniques:

  • Use C# expression for dynamic value.
  • Pass InArgument value.
  • Use String.Format, String.Split of C#
  • Use various Element activities.

The steps is quite straightforward when you use the Capture function of Element activities to identity the UI elements and use the syntax row[“ColumnName“].ToString() to access the real value of the column.

There’s some important techniques that need to be noted:

  1. After select an item in a dropdown like Select Country or Select Currency, we send an Enter key to close the dropdown.
  2. Gender is a radio button, and we need to click on the right button based on the value of column Gender. It has two values: Male and Female.
    If you use the Inspector tool, you will see that the only property that different between two radio buttons is the Name property. So we can make it dynamically by using String.Format and pass in the real value by using row[“Gender”].ToString()

3. Industries value is multiple values separated by , (comma). We need to Split it to an array of String first (by using String.Split) then use ForEach loop to build the right Selector (the same as Gender technique) for the element before click it.