Forum Discussion
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'
- rajulapati6 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_R6 years ago
Champion Level 3
Make sure that your Variables.Var1 is actually text. The "type mismatch" error is usually accurate.