Forum Discussion

naplespoet's avatar
naplespoet
New Contributor
14 years ago

Adding a popup textbox in C# for testing

Hello,



if anyone can offer a new testcomplete user and c# user a helping hand.



essentially i've been looking through most the posts and What I have is a function i created for log in to the application,

but the servername url, username, password are all hardcoded at the moment. I am not a fan of this lol.  essentially I need to be able to  have a textbox popup at the begining of test with fields for username,password and server url.  these entries I can then use as parameters in my log in script so that way its not all hardcoded in the script and can be reused for all the tests that are under that umbrella so to speak.    until I get more efficent in writting c# to test I need this to get me through the process early on.



can anyone provide any snippet of code that might lead me in the right direction in C#?

2 Replies

  • Hi,



    You can use user forms to do this. I recommend that you read the "User Forms" help topic - it provides information on working with different controls used in user forms.
  • sbkeenan's avatar
    sbkeenan
    Frequent Contributor
    Hi Wilson



    This may be of some help.  I don't use c# myself, so cannot provide you with a code snippet directly, but if you look at the on-line help topic Working with User Forms in Scripts, this might give you a few pointers.



    Good luck.



    Regards

    Stephen.