Contributions
Function creation with C#script
I'm new to c# and I used to use winrunner before HP days and one thing I used in functions were the parameters to push in so that when the function ran it would set the text value as to what I passed into the function call. essentially I need to find out first how that part of the function is created and then how to then, when i pass the function in that value gets set in my text field. I know im missing the value set in the function name , not sure how to set that up and how the text field knows that even though these are declared during this test run I only want to use what I passed in and not actually hardcode what User1/Pass1 into the text field expression. Please help. Im reading as much as I can but cant seem to find a good example. function Login () { var User1; var Pass1; var Pass2; User1 =testuser// username for textbox Pass1 =testpass// password for textbox Pass2 =testpass01 // password for textbox form = page["table"]["cellSmall"]["table"]["formLogin"]; textbox = form["cellSmall"]["textboxUserName"]; textbox["Click"](16, 11); textbox["Text"] = "testuser"; // this would need to express value of what parameter I passed in grabbing it to declaredvalues form["cell"]["passwordboxPassword"]["Text"] = "testpass"; // this would need to express value of what parameter I passed in grabbing it to declared values12KViews0likes1CommentVisual Studio and Third party control for use with Test Complete
Question, I am currently using microsoft visual studio 2005, and testcomplete enterprise on same box, we have a testing box that will only be using testexecute, I've looked up 3rd party tools like tortise and some other tools and cant seem to find an answer. essentially I just need a 3rd party tool that can point to visual studio repository and pull the project so I can have my test box just pull the latest project and tests and be able to just run testexecute without having visual studio installed on that box or testcomplete. any suggestions?13KViews0likes1CommentAdding 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#?11KViews0likes2CommentsRe: How to insert NULL Value??
Just a quick follow up to this, its kind of in the same area i'm having an issue, Im new to testcomplet and I have a CSV file where it is in a loop and in different rows, different fields are empty. so far as 1. first name, last name, middle name, address -- all are populated the first time 2. first name, last name, middle name, address -- first is blank value 3. first name, last name, middle name, address -- last is blank value 4. first name, last name, middle name, address -- address is a blank value. and in the loop it runs through each row and I'm trying to get it to insert the null value into the field and save the new entry. I keep getting type mismatch and cannot figure out how to get around it or to have the loop remove the values on each one. I just need to see if its possible to do it without having to have the script on each iteration delete that field entry after. is this possible?1.2KViews0likes0Comments