Contributions
Increment a variable by 1?
I have a loop I only want to run a maximum of 10 times. How do I get a variable to increase everytime the loop runs? if expectFailure then dim i i = 0 do aqUtils.Delay 100 set obj = browser.NativeWebObject.Find("class", "confirmboxcont") set i = i + 1 loop until obj.Exists or i >= 10 end if As far as I can see this should work but I obviously have some syntax incorrect somewhere.13KViews0likes5CommentsHow would I select these radiobuttons?
I have a couple of radiobuttons I want to select between but I can't seem to be able to find the right way to find them on the page to select them. <div class="formtitle">Email Type:</div> <div class="formfield"> <table id="ctl00_ContentPlaceHolder1_emailTypeRadioButton" border="0"> <tbody> <tr> <td> <input id="ctl00_ContentPlaceHolder1_emailTypeRadioButton_0" name="ctl00$ContentPlaceHolder1$emailTypeRadioButton" value="False" checked="checked" type="radio"> <label for="ctl00_ContentPlaceHolder1_emailTypeRadioButton_0">HTML</label> </td> </tr> <tr> <td> <input id="ctl00_ContentPlaceHolder1_emailTypeRadioButton_1" name="ctl00$ContentPlaceHolder1$emailTypeRadioButton" value="True" type="radio"> <label for="ctl00_ContentPlaceHolder1_emailTypeRadioButton_1">PlainText</label> </td> </tr> </tbody> </table> </div> </div> This is myamateurishattempt at trying to select the radio button with the lable PlainText set emailType = PageObj.NativeWebObject.Find("name", "ctl00$ContentPlaceHolder1$emailTypeRadioButton", "input") call emailType.RadioButton.SetFocus("PlainText").Click Anyone care to point/shove me in the correct direction?10KViews0likes2CommentsBest practice for this scenario?
I have a test that checks that a specific error message shows up if either an invalid email address is enteredor if the email address entered already exists in the database and passes. What would be the "best practice" way of re-using the test so that if I passed in data that I know is correct (specifically an email that isn't in the database and is formatted correctly) that the test still passes. Would you recommend a separate test or I was thinking that I could pass in a value which would either be True or False depending on what I would want the test to do and change the way the logic in the test works? Are there any benefits of choosing on way over the other?14KViews0likes2CommentsIf statement?
I want test if my registration form is functioning properly. There is some error checking on the form that checks if the email address is valid or if it's already been used. If the user enters a wrong or existing value the form highlights the error as soon as the user clicks onto another field in the form and displays an error message. How would I use Test Complete to check this and stop the script at this point with an error message? I'm assuming that I'm going to have to use an if then statement to check for the error message but I'm unsure of the syntax needed to achieve this.11KViews0likes1Comment