Ask a Question

Why I am getting "Type mismatch" exception


Why I am getting "Type mismatch" exception


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"

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.

Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

Thank you so much Robert..

Showing results for 
Search instead for 
Did you mean: