Replacing Recorded Values โโwith a Data File - Data Driven Testing
I wrote down a simple Coded UI test from visual Studio 2013. What it does is:
- Launches the website
- Fills in a form with (8 fields)
- Saves the form and closes it
Now I want to use a file data.csv
to replace these 8 values. All the searches I did, I could only find options where each input field had a different method, so it was easy to find and replace the values. In my case, 1 method and 8 fields.
How should I do it? Where can I make the change as my main file looks like this:
Where and what changes should I make to use the CSV file instead of the manual values โโI wrote down.
My designer file code is below for multiple input fields:
// Type '123456789' in 'i' text box
uIIEdit.Text = this.createKundeParams.UIIEditText;
// Type '{Tab}' in 'i' text box
Keyboard.SendKeys(uIIEdit, this.createKundeParams.UIIEditSendKeys, ModifierKeys.None);
// Type 'Jeff Hardy' in 'name_i' text box
uIName_iEdit.Text = this.createKundeParams.UIName_iEditText;
// Type '{Tab}' in 'name_i' text box
Keyboard.SendKeys(uIName_iEdit, this.createKundeParams.UIName_iEditSendKeys, ModifierKeys.None);
+3
source to share