Forum Discussion

mithunpal2's avatar
mithunpal2
Contributor
6 years ago
Solved

Why I am getting "Type mismatch" exception

Getting 

Type mismatch execption during playback.
 

I have a simple datadriven test case that opens up a page and fills in values to the fields. 

In a variable I entered 3 rows and getting those to the script.

 

On first loop run I am getting this exception

 

"Type mismatch"

  • Because you are assigning the whole variable to the parameter for "SetText" rather than the contents of a single column (in this case [0]).  So... you're assigning a table object as a string parameter.... type mismatch.

2 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Because you are assigning the whole variable to the parameter for "SetText" rather than the contents of a single column (in this case [0]).  So... you're assigning a table object as a string parameter.... type mismatch.