QTP

How to call a function (with parameters) which is in function library, taking the function name from a variable?

一曲冷凌霜 提交于 2019-11-28 00:53:07
问题 I'm trying to use getref to call a function from the function library associated with the test. My code - In action1 str = "sample" msg = "hi" x = GetRef("Function_"&str)(msg) msgbox x In the function Library, Function Function_sample(strMsg) Function_sample = strMsg End Function I'm getting the error - "Invalid procedure call or argument." But it works fine if the function is placed in the same action. How to call a function (with parameters) which is in function library, taking the function

Is it possible to call a function whose name is stored in a string in vbscript?

好久不见. 提交于 2019-11-27 23:21:17
i am trying to write a script in qtp like this Public Function sayhi msgbox "hi" end Dim level0 dim count1 count1 = DataTable.GetSheet("Action1").GetRowCount msgBox count1 For counterVariable = 1 to count1 functionname = DataTable.value("methodnames","Action1") call functionname DataTable.GetSheet("Action1").SetCurrentRow(counterVariable) Next assume functionname is going to have a value say "sayhi". Can i use that value to call the function ? like i did in the code "call functionname". I know it is not working but how to do such call ? Option Explicit function abc(a) MsgBox a End function dim

Testing Fly Out Menu in QTP

北城余情 提交于 2019-11-27 21:44:53
I am looking for ideas to trigger the actions for fly-out menus using QTP. I am testing a Web App using QTP. The application has "cascaded" or hierarchical fly-out menu. e.g. Options->Preferences While recoding QTP recognizes the end point on the Menu hierarchy (say "Preferences"). But while running the test, firing the WebElement("Preferences").Click does not work. If I call Link("Options").FireEvent ("onmouseover") it pulls down the Menu, and after that I can highlight the Preferences item, but calling the click even after pulling down the menu fails to trigger the menu action. Any Ideas to

How getObject Function internally works?

ぃ、小莉子 提交于 2019-11-27 18:43:25
问题 I'm Automating Inventor 2013 using UFT as follows:- Set oApp = GetObject(,"Inventor.Application") Set oDoc = oApp.ActiveDocument Here I'm using GetObject() function to get reference of running Inventor Application. but I have a questions about GetObject() function that 1)How it find out any application is present or in running state? 2)How it access header class of particular application so we will access of all methods and properties of that application's class? can anybody explain this? 回答1

Can I use a language other than VBScript to programmatically execute QTP Tests?

混江龙づ霸主 提交于 2019-11-27 11:46:18
问题 I have VBScript code which launches QuickTest Professional, executes a series of QTP tests, and emails the results. This works well, but I would prefer to use a language with better tools support (a good IDE for example). I am currently calling .Net libraries from the launch script, so I was wondering if it was possible to use a language like C# to accomplish the same task. If so, are there any good resources which address this? I could find very little on this topic via Google and there do

Natural Sorting using VB script

故事扮演 提交于 2019-11-27 06:38:22
问题 I want to sort below items using natural sorting: "Z1","Z3","Z2","Z20","Z10" After sorting, I am expecting the order below: "Z1","Z2","Z3","Z10","Z20" When I tried using array list, Set oAlist=CreateObject("System.Collections.ArrayList") oAlist.sort I am getting a sorting result based on ASCII: Z1,Z10,Z2,Z20,Z3 Please help me on how to do this natural sorting using vb script 回答1: For theory see here (follow the links!). Practical demo recordset: Option Explicit Const adInteger = 3 ' 00000003

Is it possible to call a function whose name is stored in a string in vbscript?

冷暖自知 提交于 2019-11-26 21:29:29
问题 i am trying to write a script in qtp like this Public Function sayhi msgbox "hi" end Dim level0 dim count1 count1 = DataTable.GetSheet("Action1").GetRowCount msgBox count1 For counterVariable = 1 to count1 functionname = DataTable.value("methodnames","Action1") call functionname DataTable.GetSheet("Action1").SetCurrentRow(counterVariable) Next assume functionname is going to have a value say "sayhi". Can i use that value to call the function ? like i did in the code "call functionname". I

Testing Fly Out Menu in QTP

北城余情 提交于 2019-11-26 20:50:19
问题 I am looking for ideas to trigger the actions for fly-out menus using QTP. I am testing a Web App using QTP. The application has "cascaded" or hierarchical fly-out menu. e.g. Options->Preferences While recoding QTP recognizes the end point on the Menu hierarchy (say "Preferences"). But while running the test, firing the WebElement("Preferences").Click does not work. If I call Link("Options").FireEvent ("onmouseover") it pulls down the Menu, and after that I can highlight the Preferences item,

一步步实施 DevOps (二)

倖福魔咒の 提交于 2019-11-26 12:33:46
Netkiller Management 手札 Mr. Neo Chan, 陈景峯(BG7NYT) 中国广东省深圳市望海路半岛城邦三期 518067 +86 13113668890 < netkiller@msn.com > Copyright © 2010-2018 netkiller 版权声明 转载请与作者联系,转载时请务必标明文章原始出处和作者信息及本声明。 http://www.netkiller.cn http://netkiller.github.io http://netkiller.sourceforge.net 微信订阅号 netkiller-ebook (微信扫描二维码) QQ:13721218 请注明“读者” QQ群:128659835 请注明“读者” 请首先阅读: 一步步实施 DevOps (一) 为什么自动化测试难以推广 2005 第一次接触自动化测试,十年已经过去了,着眼身边的企业,真正实施自动化测试的企业非常少。 大部分企业,测试仍然处在,点鼠标阶段。测试人员通常是验收交付,而没有参与整个软件开发周期。 为什么自动化测试难以实施 为什么自动化测试难以实施,我想有几个问题,阻碍了自动测试普及。 其实懂得自动化测试工具的人还是很多的,自动化测试难以实施,并不是缺乏技术人才。Load Runner, QTP 等等很多测试人员都会使用,为什么他们放弃这些工具