hp-uft

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.*"

Let tests in UFT automaticly run per ALM

ε祈祈猫儿з 提交于 2019-12-11 04:31:19
问题 I have a test-script written in UFT. How can I let this test run in ALM every morning at the same time. Like every morning at 10 AM automated? 回答1: In ALM go to the Test Lab section in the Execution Flow tab, then right click a specific test and select Test Run Schedule . Select the Time Dependency tab and fill it out. 来源: https://stackoverflow.com/questions/32325953/let-tests-in-uft-automaticly-run-per-alm

Can I determine whether current component is executed from ALM's test lab, or interactively?

一曲冷凌霜 提交于 2019-12-11 00:15:24
问题 Can I determine (programmatically) how my current business component scriptcode has been initiated? It could be standalone (using "Run" from UFT's toolbar while the component is open) from a standalone test execution (using "Run" from UFT's toolbar while a test calling the component is open) from a test lab execution (using "Run" or "Run all" button in the test set im ALM)? Foggily related: Can I determine if current test execs from test lab or interactively from within QTP IDE? 回答1: If the

Set Object Reference in UFT with or without the “Execute” Statement

核能气质少年 提交于 2019-12-10 11:44:01
问题 Recently I have been assigned a project wherein the object references are set using the "Execute" Statements as shown below: Execute "Set objButton = XamRibbonWindowAddin(""XamWindow_DashBoard"").WpfButton(""Save"")" Whereas, my approach for setting the object references has always been like this(without the "Execute" Statement): Set objButton = XamRibbonWindowAddin("XamWindow_DashBoard").WpfButton("Save") I have been using the latter method as it allows me to make use of Intellisense in UFT

Search and Replace a number of characters in Excel using VBscript

本秂侑毒 提交于 2019-12-10 09:52:44
问题 I need to search and to replace a specific part of a string in an Excel sheet. Here is my code and I don't know how I can exactly search this part in each Cell.value . my_new_string = "abc" For each objSheet1 in objworkbook2.sheets If objSheet1.Name = "Name1" Then LastRow = objsheet1.UsedRange.Rows.Count + objsheet1.UsedRange.Row - 1 For i = 1 To LastRow Step 1 For j = 1 To 15 Step 1 If objExcel1.Cells(i, j).value = "xyz" Then 'Here I have to check if the Cell value contains xyz and to

HP UFT API Test - Saving Response/Checkpoint values

孤街浪徒 提交于 2019-12-08 07:53:11
问题 Is there a way to capture and store (or write to a file) the values returned in the Response? (Checkpoint values) Using HP UFT 11.52 Thanks, Lynn 回答1: I figured it out. In UFT API under Standard Activities, there are File function modules including "Write to File". I added the module to the test, set the path and other properties, passed the variable to the file and it worked! Couldn't be easier. 回答2: I mentioned this on my other answer , you can also write it programatically if you have

UFT 12.01 “.click” and “FireEvent” doesn't work

青春壹個敷衍的年華 提交于 2019-12-08 04:30:37
问题 I had an already successful running code but after some application maintenance/deployment. The same code doesn't work. Now the problem is that the same code works on different system. I have a code - Browser("").Page("").WebElement("").click - which used to run earlier but now it doesn't. The properties have remained the same and highlights when highlighted, while executing it goes to the application but doesn't click. The same is the case for FireEvent . I have tried different methods to

UFT-API: How to write the output of a select data action to the test's data source

时间秒杀一切 提交于 2019-12-08 02:34:15
问题 In a uft-api test I have a select data component that returns the query results. The results comeback in an array and I'm trying to figure out how to write the results back to the test's data pane, either excel or local table. 回答1: You can use GetDataSource Class of UFT API , it will work like this lets say you imported excel from FlightSampleData.xls, and named it as FlightSampleData, you have <input> sheet, accessing the sheet will be like below: GetDataSource("FlightSampleData!input).Set

Set Object Reference in UFT with or without the “Execute” Statement

允我心安 提交于 2019-12-06 16:23:59
Recently I have been assigned a project wherein the object references are set using the "Execute" Statements as shown below: Execute "Set objButton = XamRibbonWindowAddin(""XamWindow_DashBoard"").WpfButton(""Save"")" Whereas, my approach for setting the object references has always been like this(without the "Execute" Statement): Set objButton = XamRibbonWindowAddin("XamWindow_DashBoard").WpfButton("Save") I have been using the latter method as it allows me to make use of Intellisense in UFT which is quite an advantage sometimes. Is there any reason I need to switch to the 1st approach or

UFT11.50 - Service Test - How can I obtain the data from the response body

℡╲_俬逩灬. 提交于 2019-12-06 12:33:06
问题 { "Id": 456, "Type": null, "Name": "Store112", "Root": "\\\\server\\ShareFolder", "Username": "alm", "Password": null } This is a JSON file response body from a HTTP Request, how can I get the value of 'ID' property? Does UFT or QTP has a function to support this? 回答1: In order to use a specific JSON property from the response you should do the following. Select the HTTP tab in the properties pane In the Response Body section select JSON from the drop down list Load a sample of the expected