QTP

Don't want to wait for method to return

安稳与你 提交于 2019-12-11 09:19:32
问题 Is there a way to "tell" C# not to wait for object's method to return? Using COM (VbScript) I'm able to fire a method without waiting for it to return, so I would like to use C# the same way. The VbScript Code: Dim qtApp Set qtApp = CreateObject("QuickTest.Application") qtApp.Open("C:\Temp\Test") qtApp.Run '// VbScript does not wait for this method to finish Set qtApp = Nothing The C# code: //Refer the object var qtApp = new QuickTest.Application(); //Open the test qtApp.Open("C:\\Temp\\Test"

what is the use of Object(poroperty) in qtp

萝らか妹 提交于 2019-12-11 08:06:47
问题 what is the use of Object(poroperty) for example JavaWindow(something).JavaStaticText("class_index="&i) ''# i is the increment variable. what are the uses using like this instead of JavaWindow("Form").JavaStaticText("Name") 回答1: This is known as Descriptive Programming or Programmatic Description it's when the object's description is inline in the script rather than in the Object Repository (OR). You have the syntax slightly wrong though it should be colon equals ( := ) and not just equals( =

How to create description object model at runtime in uft/qtp?

三世轮回 提交于 2019-12-11 05:36:25
问题 thank you for taking a look on this question. Just wondering if there is a best approach to create description object model at runtime. My code fails Object doesn't support this property or method: 'Browser(...).page(...).WebButton' FunctionCreateDescObjAt_RunTime(StrBrowserNme,StrBrwsrTitle,StrObject,StrPgeNme,StrPgtitle,StrObjectName,index)` 'create a description object for Browser & Page` Set WebBrwsrDesc= Description.Create WebBrwsrDesc("application version").value= "Internet Explorer.*"

QTP ignores the limit of numbers of input charactors

坚强是说给别人听的谎言 提交于 2019-12-11 04:35:27
问题 I'm working now in QTP to test un website. There is a text input area that accepts 160 charactors. When using QTP to input a long text, it doesn't regard the limit and all the charactors are displayed in the area. Also, there is a message beside the area to notify the number of charactors remained and this number never changed after the input by QTP. So I'd like to know if someone has already worked on this issue and can give me some advices. Thanks a lot in advance. Allen 回答1: As Tom said

QTP OR Automation Model : Adding Multiple objects (Same type) to QTP Object Repository

纵饮孤独 提交于 2019-12-11 04:08:46
问题 I am using the below code: Set myRepository = CreateObject("Mercury.ObjectRepositoryUtil") myRepository.Load "D:\Explore\QTP\Repositoryfff.tsr" Set PageObj = myRepository.GetObjectByParent("Browser(""salesforce.com - Customer"")","Page(""salesforce.com - Customer"")") Set CustomObj = CreateObject("Mercury.WebLink") myRepository.AddObject CustomObj, PageObj, "OrderNum1" myRepository.AddObject CustomObj, PageObj, "OrderNum2" myRepository.Save Set myRepository = Nothing Set PageObj = Nothing It

How to test labels in QTP

这一生的挚爱 提交于 2019-12-11 03:47:51
问题 I'm using QTP 9.5 test my application written in Delphi. I got Delphi Add-in installed and QTP can identify Delphi controls. Most but not all, specially TLabel. QTP can not recognize this control and is being ignored by Object Spy. Any suggestion, tip, clues how to test labels ? cheers ! 回答1: Have you tried with TStaticText instead of TLabel? They are Labels with a Window Handle (descending from TWinControl instead of TGraphicControl) which means they can get Windows messages from the outside

i am confused in a small concepts

梦想与她 提交于 2019-12-11 01:29:39
问题 I am very new to VBscript and learning hard all the concepts. During my practice I am stuck with a doubt. dim a,b,c set a = CreateObject("scripting.filesystemobject") 'initiate the file system object' set b = a.GetFolder("E:\test") 'returns a object . and for the instance that varaiable b refers to that returned object' c = b.datecreated 'accesing and storing the property to a variable /C/' msgbox "folder: " &c When I execute this there is no error message and it works fine. But when I change

GetRef not working if function is loaded at runtime using LoadFunctionLibrary

Deadly 提交于 2019-12-10 22:36:14
问题 I am trying to execute a function from a functional library (which I am loading at runtime). Everything works if I use Eval or Execute to run the function but I wanted to use GetRef as mentioned in this and this QTP Code Snippet Call LoadFunctionLibrary("/../Libraries/Tests.vbs") Set objCon = CreateObject("ADODB.Connection") objCon.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" & "C:\_Work\WorkingFolder\TestList.xlsx" & "';Extended Properties='Excel 12.0;HDR=YES;IMEX=1';" Set objRS =

(HP QuickTest) How do I get HTTP status using QuickTest?

孤人 提交于 2019-12-10 21:19:15
问题 I'm creating an QuickTest script that get all URL's for a page and check if the status of http request where code is 200. But my question is how do I get the http request status code from a URL ? 回答1: This was my solution: Set Http = CreateObject("Microsoft.XMLHttp") Set oDesc = Description.Create() oDesc("micclass").Value = "Link" Set EditCollection = Browser("Browser").Page("Page").ChildObjects(oDesc) URL_TEMP = EditCollection(i).GetROProperty("href") Http.Open "GET" , URL_TEMP , false Http

Delphi 2009 (and probably Delphi 2010 as well) and QTP

青春壹個敷衍的年華 提交于 2019-12-10 20:18:07
问题 We have a suite of automatic tests written in QTP (Quick Test Pro - an HP product), and we have just upgraded to Delphi 2009 (I know we are late adopters), and all of these tests no longer work. The plugin that QTP have released does not work with Delphi 2009 - we have that in writing now from HP. Do you know of (a) anyone else in the same boat as us (b) anyone have a work around, as I can't see one and HP don't seem to be too proactive about this. Any help would be appreciated. 回答1: I hate