cancel
Showing results for 
Search instead for 
Did you mean: 

TestComplete 14 -Unable to Enter Username & Password

SOLVED
Highlighted
Regular Contributor

TestComplete 14 -Unable to Enter Username & Password

I created a simplet keyword test which launches a webpage in chrome and enters username & password. The keyword test passed confirming the keyboard input was successful however the text field for username and password  in the browser was all blank.

When the test runs, I do not see the username and password being entered on screen. I have used 'Key' operations to enter the text.

 

Any suggestions as to what could be possible wrong here ?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: TestComplete 14 -Unable to Enter Username & Password

Make sure that your Variables.Var1 is actually text.  The "type mismatch" error is usually accurate.

View solution in original post

8 REPLIES 8
Highlighted
Staff

Re: TestComplete 14 -Unable to Enter Username & Password

try to use the settext operation instead. 

also make sure to prep all of the browser that you would be testing on : https://support.smartbear.com/testcomplete/docs/app-testing/web/general/preparing-browsers/chrome.ht...

Best,
Justin Kim
Highlighted
Contributor

Re: TestComplete 14 -Unable to Enter Username & Password

Hi @gdave ,

I would initially check if the TestComplete  Chrome addin is enabled and your Web extension is turned on.

After checking the above two things, try spying the browser and see if you are able to spy and higlight the objects properly.

 

-Ashwin

Please give a Kudo and accept it as a solution if this works

Highlighted
Community Leader

Re: TestComplete 14 -Unable to Enter Username & Password

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")

 

Highlighted
Regular Contributor

Re: TestComplete 14 -Unable to Enter Username & Password


@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'

image.pngimage.pngimage.png

Highlighted
Regular Contributor

Re: TestComplete 14 -Unable to Enter Username & Password


@rajulapati wrote:

Hi @gdave ,

I would initially check if the TestComplete  Chrome addin is enabled and your Web extension is turned on.

After checking the above two things, try spying the browser and see if you are able to spy and higlight the objects properly.

 

-Ashwin

Please give a Kudo and accept it as a solution if this works


Chrome addin is enabled. I even got testComplete icon at the right corner of the bar.

Highlighted
Contributor

Re: TestComplete 14 -Unable to Enter Username & Password

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

Highlighted
Community Hero

Re: TestComplete 14 -Unable to Enter Username & Password

Make sure that your Variables.Var1 is actually text.  The "type mismatch" error is usually accurate.

View solution in original post

Highlighted
Community Manager

Re: TestComplete 14 -Unable to Enter Username & Password

Thanks everyone for active participation in this thread. This is very appreciated!

 

@gdave were you able to find out what was causing the issue? Please share you progress with usSmiley Happy


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Read the Latest News
JuneSCNJ
Top Kudoed Authors