Forum Discussion

Guido_P's avatar
Guido_P
Occasional Contributor
2 years ago

Entering text from a variable in a browser

I am creating a keyword test for a desktop application in Testcomplete 14 which requires Testcomplete to authenticate to a web environment first. The login screen is a browser (splashscreen) and I let TC click the username field. I have the user id stored in a variable but I cannot get TC to enter it. I used the operation "add_TextInput" but when I run the test nothing is entered. The same happens for the password field.

I can use "Keys" instead, but that means the password is visible in the keyword test, which is not acceptable.

 

Any way how I can fix this? 

2 Replies

  • MW_Didata's avatar
    MW_Didata
    Regular Contributor

    Maybe you could try SetText instead of keys, this is what i do for passwords in browser:

    Passwordbox:  SetText : "Var.Pass"

    Passwordbox:  Keys: "[Enter]"

     

    Enter is not technically needed but otherwise its clickbutton so

     

    EDIT: Also Password variable is stored in persistent variables with type: Password