Contributions
Re: Query on accessing exel file...
Hi even i am not able to use "goto" statement of VB in "Test complete" tool. I am trying the following code but encountering an run time error saying"Type miss match" at4 th line . pls tell me the syntax of GO TO sub demo for i=1 to 10 if i<3 Then Goto xyz Else Log.Message(i) end if Next label: xyz Log.Message("Out of loop now") end sub633Views0likes0CommentsRe: Query on accessing exel file...
hi Alexei Karas thanks for the suggestions......but the given syntax replace the "Break statement" of C,which comes out of loop. but i want skip the remaining code followed by "continue statement"and go to beggining of the loop.....and continue execution. please let me know if the question is not clear....633Views0likes0CommentsRe: Query on accessing exel file...
Hi Can you please tell me what is the substitute for "continue" statement in VB script with Test complete tool..? as we use "exit for" in place of break..... I want to use it within for loop like....... for i=0 to 10 if i<3 then continue end if next1.6KViews0likes0CommentsRe: Query on accessing exel file...
Hi David, Is there any in built property to check proper Date format in Test Complete....? Ex: 35/01/1958 or 35/56/1987 these are all wrong date formats......... I want to give these Format (dd/mm/yyyy) as whole input, and check if it is proper or not...?1.6KViews0likes0CommentsRe: Query on accessing exel file...
Hi david.... I am pasting part of code here..... /* strDob is a string read from excel sheet If not IsNull(strDob) Then ctlCheckBox.maskedTextBoxDateOfBirth.Click() /* path to DOB masked text box in my application ctlCheckBox.maskedTextBoxDateOfBirth.wText=strDob end if Here just like copy,paste i write strDob to a masked text box in my application all dd/mm/yyyy at a time..... but i want to write to it literal wise.Is there any other properties available..? I tried the "TcxMRUEditProperties" like this in my code..... maskedit=TcxMRUEditProperties("Aliases.Patient_Administration.EditPatientDialog.groupBoxPatient.maskedTextBoxDateOfBirth.Mask") Log.message(maskedit.text) Log.message(maskedit.properties.EditMask) Am i using the syntax properly....?as i am encountering an error here saying"Type mismatch :TcxMRUEditProperties" please let me know if u need any more details....1.6KViews0likes0CommentsRe: Query on accessing exel file...
Hi.... One of the fields in my application includes "masked text box" i,e for date, pincode . How to read values in to these masked text boxes in testcomplete...? I am trying to use "TcxMRUEdit.properties".....but getting struck in syntax.....1.5KViews0likes0CommentsRe: Query on accessing exel file...
hi I am using Testcomplete 7 version. Pls look in to attachments. The code tries to read from exel sheet and write it to the appplication. In application only the FNname and Lname are mandatory, other fields are optional. But if leave any fields empty in exel file.....the code generates an error. Pls suggest me in this regard. the code is as follows..................... Sub main 'luanching the Dexis software Call TestedApps.Patient_Administration.Run() Set patient_Administration = Sys.WaitProcess("Patient Administration", -1) 'Call sub routine "PatientCreation" for Creating New patient call PatientCreation Log.message("patient Creation is done successfully") 'Closes the Dexis aplication Call Aliases.Patient_Administration.MainForm.Close() end sub sub PatientCreation Dim drvDriver 'Declare a Driver to access Exel Sheet Dim strFname Dim strMname Dim strLname Dim strDob Dim StrSocSecNum Dim strSex dim strStreet1 dim strStreet2 dim strCity dim strState dim strZipCode dim strPhone 'Driver is initialised to point to the Exel File Set drvDriver=DDT.ExcelDriver(Project.Path+"\Data\PatientData.xlsx","sheet1") strFname=drvDriver.Value("Fname") strMname=drvDriver.Value("Mname") strLname=drvDriver.Value("Lname") strDob= aqConvert.DateTimeToStr(drvDriver.Value("DOB")) StrSocSecNum=Trim(drvDriver.Value("SSN")) strSex=Trim(drvDriver.value("SEX")) strStreet1=Trim(drvDriver.value("Street1")) strStreet2=drvDriver.value("Street2") strCity=Trim(drvDriver.value("City")) strZipCode=Trim(drvDriver.value("State")) strState=Trim(drvDriver.value("ZipCode")) strPhone=Trim(drvDriver.value("Phone")) 'read the excel file till the EOF Do while not drvDriver.EOF() Set btnNewPatient = Aliases.Patient_Administration.MainForm.zpanelClient.LocalPatientsControl.zpanelSearch.zbuttonNewPatient Call btnNewPatient.Click() set ctlCheckBox=Aliases.Patient_Administration.EditPatientDialog.groupBoxPatient ctlCheckBox.textBoxFirstName.Click() ctlCheckBox.textBoxFirstName.wText = strFname 'copy the firstName to application ctlCheckBox.textBoxMiddleName.Click() ctlCheckBox.textBoxMiddleName.wText=strMname 'copy the MiddleName to application ctlCheckBox.textBoxLastName.Click() ctlCheckBox.textBoxLastName.wText=strLname 'copy the LastName to application ctlCheckBox.maskedTextBoxDateOfBirth.Click() ctlCheckBox.maskedTextBoxDateOfBirth.wText=strDob ctlCheckBox.maskedTextBoxSocialSecurityNumber.Click() ctlCheckBox. maskedTextBoxSocialSecurityNumber.wText=StrSocSecNum if strSex="F" then ctlCheckBox.radioButtonFemale.ClickButton() Else ctlCheckBox.radioButtonMale.ClickButton() end if ctlCheckBox.WinFormsObject("textBoxStreetAddress1").Click() ctlCheckBox.WinFormsObject("textBoxStreetAddress1").wText=strStreet1 ctlCheckBox.WinFormsObject("textBoxStreetAddress2").Click() ctlCheckBox. WinFormsObject("textBoxStreetAddress2").wText=strStreet2 ctlCheckBox.WinFormsObject("textBoxCity").Click() ctlCheckBox. WinFormsObject("textBoxCity").wText=StrCity ctlCheckBox.WinFormsObject("maskedTextBoxState").Click() ctlCheckBox. WinFormsObject("maskedTextBoxState").wText=StrState ctlCheckBox.WinFormsObject("maskedTextBoxZipCode").Click() ctlCheckBox. WinFormsObject("maskedTextBoxZipCode").wText=strZipCode ctlCheckBox.WinFormsObject("maskedTextBoxPhoneNumber").Click() ctlCheckBox.WinFormsObject("maskedTextBoxPhoneNumber").wText=StrPhone call drvDriver.Next()' Iterate the Driver to next record in Exel Sheet Aliases.Patient_Administration.EditPatientDialog.buttonOK.Click() 'Click OK button once patient information is entered if drvDriver.EOF()then exit Do Else strFname=drvDriver.Value("Fname") strMname=drvDriver.Value("Mname") strLname=drvDriver.Value("Lname") strDob=drvDriver.Value("DOB") strSocSecNum=drvDriver.value("SSN") strSex=drvDriver.value("SEX") strStreet1=drvDriver.value("Street1") strStreet2=drvDriver.value("Street2") strCity=drvDriver.value("City") strZipCode=drvDriver.value("State") strState=drvDriver.value("ZipCode") strPhone= drvDriver.value("Phone") end if loop end sub Sub Test1 Call Aliases.Patient_Administration.EditPatientDialog.groupBoxPatient.comboBoxProvider.ClickItem("Provider, Joe J") End Sub The xxel sheet includes................ Fname Mname Lname DOB SSN SEX Street1 Street2 City State ZipCode Phone ffirst mfirst lfirst 12/12/1987 123123123 M aa aaa bang kar 1234 1234564569 fsecond Empty fujkk 12/12/1659 11111111 M bb bbb gadag kar 12423 2123645633 fthird mthird lthird 1/2/1987 222222222 F cc ccc hub raj 14234 3265423695 ffourth mfourth lfourth 1/5/1985 333333333 F dd ddd mysore raj 1545 4789563216 aaaaa hhhhh jkkkll 6/4/1968 444444444 M ee eee Dharwad mah 4565 2365198471 aaa mmm zzz 6/3/1958 555555555 M ff fff bang jammu 1333 102365203641.5KViews0likes0Comments