Data driven data with blank optional fields
I then added additional lines of data to load into the test. In our application some data fields are optional and therefor the values in the cells for those fields are blank. When I run the test with the data with blank fields I get error messages. I've read a number of the forum discussions about using Excel for data and I am aware of the limitation that all values in a column must be the same type of data.
I was able to switch my data source to a CSV file easily, but I still get an exception "Type mismatch" on the first blank field in the data.
Blank optional fields are valid in my application. How can I use data driven loops to load those records?
Use Empty (I used in vb) keyword within the if condition for all of optional field.
Let say if Mobile is optional, following code will do for you
If (DDT.CurrentDriver.Value("Mobile")<> Empty) Then
your code to enter set/enter mobile number
Are you taking part in our DDT webinar? Maybe this question will be discussed there.
SmartBear Community and Education Manager