We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
Make sure that your Variables.Var1 is actually text. The "type mismatch" error is usually accurate.
Hi G-wagon,
There are two ways to enter text.
1)Keys - the one you've used it simulates what an actual user would do. So it types one alphabet/input at a time.
obj.Keys("user");
2)setText- it will set the entire input at once
obj.setText("user")
Reshail wrote:Hi G-wagon,
There are two ways to enter text.
1)Keys - the one you've used it simulates what an actual user would do. So it types one alphabet/input at a time.
obj.Keys("user");
2)setText- it will set the entire input at once
obj.setText("user")
So interesting this happened:
The user name field worked fine when I used 'textContent[Set]' operation, however, password field falied with 'Exception - Type Mismatch'
Try spying the object and see if the Set Operation is allowed on Password field, because sometimes we would have Setpassword method allowed for such type of fields , similarly for dates we have SetDate.
-Ashwin
Make sure that your Variables.Var1 is actually text. The "type mismatch" error is usually accurate.