projectrequirement:1.projecthastobemobile,meaningnohardcodedpath.usingenvironment:Environment("TestDir")togetthecurrenttestdirectory.Constructurthedirectorylikethisc:MercuryTourforscripts,C:mercuryTourDatatablefordatatables,c:mercurytourobjectrepositoryforobjectrepository,c:mercuryTourresultsforsavedtestresult#mainscript
#getthepathes
filepath=Environment("TestDir")
datatablepath=filep...[
閱讀全文]
IntroductiontoDescriptiveProgramming.
HowtowriteDescriptiveProgramming?
WhenandWheretouseDescriptiveprogramming?
SomepointstonotewithDescriptiveProgramming.
IntroductiontoDescriptiveProgramming:
Descriptiveprogrammingisusedwhenwewanttoperformanoperationonanobjectthatisnotpresentintheobjectrepository.Therecanbevariousvalidreasontodoso.Wewilldiscussthemlaterinthisarticle.
How...[
閱讀全文]
第一次接觸是一朋友的。小小的土黃色膠。朋友說最好與果汗一起喝下去。後來我了一下,知道它並不是特別危險的藥物。多年前用於治療抑,隻是後來被越來越多的人用來party,才被禁的。在youtube上有一段abc的采訪視頻,被采訪者無不說它是重要的。但老外通常都是容易極端,誰知道他們是不是真的需要還是隻想high。我的一個朋友曾經告訴我他在用了後,曾幾次想自殺。比[
閱讀全文]
GenericLibrary:
f_SelectFile(sFilePath,sFilePathandName)
ThisfunctionreturnstheselectfilenameanditspaththroughsFilePathandName.sFilePathisfordefaultfilepath.f_CreateFolder(sFolderPath,sFolderName)
ThisfunctionreturnsTrueifthenewfolderwascreated.
f_GetCurrentTime(iTimeformat,dCurrentTime)
Thisfunctionreturnsthecurrenttimein12h(1)or24h(2)format.12:01:01AMor23:45:23PMf_GetCurrentD...[
閱讀全文]
DefineapublicfunctiontoacceptuserenteredURLandsaveditinanenvironmentvariable.InSetupAction:
Environment.Value("userEnteredURL")=UserInputURL()InPublicFunctionlibrary:
'@DescriptionAcceptuserinputURL
PublicFunctionUserInputURL()
UserInputURL=Inputbox("PleaseentertheURLyouwanttotest.","EnterTestingURL","http://newtours.demoaut.com/")
EndFunctionStringfunctions:
Defineafunctio...[
閱讀全文]
QTPexamquestions:Afterturningoffexternalreuseableaction:yougetwarningmessagefromwhere(orwhatkindofmessage)?Howtorecordinlowleveloranalogmode:ClickRecord,thenclickLowleveloranalogbuttonorselectAutomaton--Recording,select-lowlevelrecordingoranalogrecording.Howtocreateindependentornetstedactions?splitanaction.Activescreendefaultcapturelevel:partialDefinenewtestobject:forplannedapplicationupdateorfunc...[
閱讀全文]
ManagingObjectsNote:ThefunctionalitydescribedinthissectionisavailableintheObjectRepositorywindowforthelocalobjectrepository,andtheObjectRepositoryManagerforsharedobjectrepositories.Adding,Defining,Deleting,CopyingTestObjects
1.AddingandDeletingTestObjectsinaLocalorSharedObjectRepository
YoucanusetheNavigateandLearnoption,forexample,toaddobjectstothesharedobjectrepositoryaccordingtoyourdefi...[
閱讀全文]
RegularExpressionsOverview
QuickTestenablesyoutoconfigurethevaluesforpropertiesandotheritemsbydefiningavalueasaconstantoraparameter.Youcanalsouseregularexpressionsforsomevaluestoincreasetheflexibilityandadaptabilityofyourtests.
Aregularexpressionisastringthatspecifiesacomplexsearchphrasebyusingspecialcharacters.Regularexpressionsareusedtoidentifyobjectsandtextstringswithvaryingvalues.
...[
閱讀全文]
User-DefinedFunctionsandFunctionLibrariesAfunctionlibraryisaseparateQuickTestdocumentthatcontainsVisualBasicscript.AnytextfilewritteninstandardVBScriptsyntaxcanbeusedasafunctionlibrary.Yourfunctionlibrariescancontain:Functiondefinitions(functionsignatureandcode).Youcancallthesefunctionsfromotherfunctionsorfromanactioninyourtestafteryouassociatethefunctionlibrarywiththetest.VBScriptstatements.These...[
閱讀全文]
ProgramminginExpertViewProgrammaticDescriptions
WhenQuickTestlearnsanobjectinyourapplication,itaddstheappropriatetestobjecttotheobjectrepository.Aftertheobjectexistsintheobjectrepository,youcanaddstatementsintheExpertViewtoperformadditionaloperationsonthatobject.YoucanalsoinstructQuickTesttoperformoperationsonobjectswithoutreferringtotheobjectrepositoryortotheobject’sname.Todothis,youprovideQ...[
閱讀全文]