Forum Discussion
Hi gdave,
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")
- gdave5 years agoRegular Contributor
Reshail wrote:Hi gdave,
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'
- rajulapati5 years agoContributor
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
- Marsha_R5 years agoChampion Level 3
Make sure that your Variables.Var1 is actually text. The "type mismatch" error is usually accurate.
Related Content
Recent Discussions
- 3 hours agoashly