Contributions
Type Mismatch Error solution?
Data-Driven test using Excel as a data source. Test Case: Updating a street address. Street Address 1 is required. Street Address 2 is optional. Implementation: A Keyword Test accesses an Excel sheet and passes the cell values as parameters to keyword tests (UpdateStreetAddress1 and UpdateStreetAddress2). Since Street Address 2 is optional, my first attempt was to leave Street Address 2 empty in the Excel sheet. This triggers a Type Mismatch when UpdateStreetAddress2 is called as it is expecting a String. My solution: The calling Keyword Test would use aqConvert.VartoStr to essentially “type” the value when calling UpdateStreetAddress2. This works and it would allow me to use aqConvert.VartoInt and/or aqConvert.VartoFloat as appropriate for other datatypes. This seems to me the most straightforward approach, but I'm still learning test complete and perhaps there is a better solution. Comments?Solved1.3KViews0likes1Comment