cancel
Showing results for 
Search instead for 
Did you mean: 

Why I am getting "Type mismatch" exception

SOLVED
Highlighted
Occasional Contributor

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"

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Why I am getting "Type mismatch" exception

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
[Community Expert Group]
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
Extensions available

View solution in original post

2 REPLIES 2
Community Hero

Re: Why I am getting "Type mismatch" exception

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
[Community Expert Group]
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
Extensions available

View solution in original post

Occasional Contributor

Re: Why I am getting "Type mismatch" exception

Thank you so much Robert..

New Here?
Join us and watch the welcome video:
Final Interview in the Series
API_testing_mistake#7
Top Kudoed Authors