- 博客(111)
- 收藏
- 关注
转载 Web Service示例程序
Below is the C# code used to create our sample web service:namespace RelevantCodes.TestingWebServices{ using System; using System.Web.Services; using System.Xml; using System.X...
2013-11-22 20:18:00
132
转载 XMLHTTP Request
MethodDescriptionopen(method, URL) open(method, URL, async) open(method, URL, async, username) open(method, URL, async, username, password)Specifies the a...
2013-11-22 16:33:00
135
转载 直接获取OR的对象并改变它的属性
Set Obj = ORUtil.GetObject("Browser(""Browser"")")'Update one of the propertiesObj.SetTOProperty "title", "this is set using API"'Update the object we have changedORUtil.Update obj...
2013-11-22 09:01:00
162
转载 打印OR中的WebTables逻辑名
Dim ORUtil'Create the object repository automation APISet ORUtil = CreateObject("Mercury.ObjectRepositoryUtil")'Load the object repositoryORUtil.Load "C:\temp\SharedOR.tsr"'Get al...
2013-11-22 08:57:00
113
转载 在QTP中申明CSS Selectors
Example 1: John SmithJohn Smith is within the H4 tag. Its TEXT value is used to implement Object Indentification in this example. Below is the target HTML used:<body> <h4>John ...
2013-11-21 21:47:00
101
转载 CSS patterns, selectors, pseudo-classes
To understand how CSS Selectors work, let's use the following web page as an example:<html> <head> <title>CSS</title> <style type='text/css'> b...
2013-11-21 20:05:00
111
转载 XPath Axes 示例
Example 1:Use Button 3 to climb up to its TABLEThis is similar to example we saw in the section 'Select Parent Nodes using Children' but instead of using the XPath expression /..,we will use ax...
2013-11-21 12:29:00
147
转载 XPath Axes
AxisNameDescriptionancestorSelect all parent nodes(ancestor: parent,grandparent etc) of the current node.ancestor-or-selfSelect all parent nodes(ancestor: parent,grandp...
2013-11-21 09:36:00
80
转载 通过Children选择根节点
Example 1:<table id='table2'> <tr class='row1' id=BPT> <td>View ID</td> <td><input type='button' value='Button 4' class='btn_blue'></td>...
2013-11-21 09:11:00
107
转载 在QTP中申明XPath
Example 1:<body> <h4>John Smith<input type=checkbox name="select" /></h4><body> <h4>Anne Anderson<input type="checkbox" name="select" checked=t...
2013-11-21 09:02:00
103
转载 从Element获取父WebTable
Demo:<table> <tr> <table border="1"> <tr> <td>Attribute</td> <td>Value</td> <td>Description</t...
2013-11-20 16:37:00
185
转载 点击WebTable中的行
Method1'Get the tables DOM objectSetoDOMTable=Browser("").Page("").WebTable("").object'To Click on (1,1) we can use:Row=1Col=1oDOMTable.rows(Row-1).Cells(Col-...
2013-11-20 15:51:00
115
转载 GC浅析之二HotSpot GC了解
HotSpot JVM 内存模型内存概念上如下划分HotSpot内存参数-Xms; -Xmx 堆大小-Xss 栈大小-Xmn --XX:SurviorRatio=xxx 新生代大小 ;新生代中eden和survivor的比例-XX:NewRatio=xx;-XX:MaxTenuringThreshold 新生代和永久代的比例,新生代最大存活...
2013-10-25 12:55:00
170
转载 GC浅析之一GC基础知识
背景知识:Java内存分布分为以下几个区域本地方法区:(线程私有)native code占用的内存。方法区:存放Class定义,常量,全局变量PC计数器:(线程私有)记录当前指令位置栈:(线程私有)对正在运行方法指令,变量值,实例引用进行压栈堆:存放对象实例GC要解决2个问题计算出需要回收的无用对象如何回收无用对象问题1:计算出需要回收...
2013-10-25 12:52:00
127
转载 LoadRunner技巧之Vugen读取文件并验证
checkprocess(){char command[1024];int i, total = 0;char buffer[12], ch;char *filename = lr_eval_string("C:\\tasklist_{pTime}.txt");long file_stream;//Run a system command...
2013-09-12 10:16:00
202
转载 SQL FROM大表和小表的顺序, %位置的性能影响
1.BORACLE 的解析器按照从右到左的顺序处理FROM子句中的表名,FROM子句中写在最后的表(基础表 drivingtable)将被最先处理,在FROM子句中包含多个表的情况下,你必须选择记录条数最少的表作为基础表。如果有3个以上的表连接查询, 那就需要选择交叉表 (intersection table)作为基础表, 交叉表是指那个被其...
2013-08-13 21:59:00
490
转载 SQL大小写和where条件与表的顺序
1.SQL的大小写要看数据库类型, 如果数据库是Oracle, 则答案是BSQL Server中, 可以手工设置数据库是否区分大小写, 所以SQL大小写对解析没有什么影响, 但是要注意的是, 一定要统一表名, SQL语句等等的格式, 统一大写或小写.Oracle则不一样, SQL设置为统一为大写时性能更优, 虽然比小写时性能高不了多少.以下内容摘自Oracle官方的...
2013-08-13 21:58:00
156
转载 SQL优化细则
(1) 选择最有效率的表名顺序(只在基于规则的优化器中有效):ORACLE 的解析器按照从右到左的顺序处理FROM子句中的表名,FROM子句中写在最后的表(基础表 driving table)将被最先处理,在FROM子句中包含多个表的情况下,你必须选择记录条数最少的表作为基础表。如果有3个以上的表连接查询, 那就需要选择交叉表 (intersection table)作为基础表, 交叉表...
2013-08-11 22:00:00
104
转载 WebTable中查找包含指定文字的行
Function GetRowWithText(Obj, ByVal Text, StartFromRow, RegExpression)bReg = LCase(RegExpression)Set oDOM = Obj.ObjectIf bReg Then Set oReg = new RegExp oReg.Pattern = Text oReg.Global...
2013-06-21 11:22:00
92
转载 用或不用HTML DOM的原因
适合HTML DOM的原因: 1.QTP only provides access to radio buttons through the WebRadioGroup rather than providing access to individual elements. 2.QTP provides no way to access webpage style sheet...
2013-06-21 10:02:00
68
转载 将QTP共享OR转换为关键字类型的DP对象库,并导出到Excel
Dim RepositorySet Repository = CreateObject("Mercury.ObjectRepositoryUtil.1")Repository.Load "C:\Test.tsr"'Set Repository = XMLUtil.CreateXMLFromFile("C:\Temp\TestOR.xml")'This array will...
2013-06-14 16:37:00
92
转载 不需要事先加载Add-in的特殊情况
1.The SIEBEL add-in uses SIEBEL Automation API, so if a SIEBEL application is lauched before QTP, QTP will still be able to indentify the Siebel objects. This is because even though Siebel runs i...
2013-06-14 15:22:00
89
转载 转发--JVM内存管理与垃圾回收
JAVA性能剖析1——JVM内存管理与垃圾回收内存管理和垃圾回收是JVM非常关键的点,对Java性能的剖析而言,了解内存管理和垃圾回收的基本策略非常重要。最近进行了系列性能测试培训,对JVM内存管理涉及到的概念重新学习梳理了遍,总结下方便大家共同学习进步。一、为什么要分代在程序运行过程当中,会创建大量的对象,这些对象大部分是短周期的对象,小部分是长周期的对象...
2013-05-09 16:13:00
73
转载 获取脚本ID的脚本
TC_Path = "***"process_name = "BL"Set fso = CreateObject("Scripting.FileSystemObject")Set parentFolders = fso.GetFolder(TC_Path & process_name)Set fc = parentFolders.SubFolderstcid = ""...
2013-04-16 18:17:00
475
转载 修复QTP hang的问题
Possible fixOpen a command prompt (Start > Run > type "cmd" > "Ok")Navigate to "/bin" directory (for example: "cd C:\Program Files\HP\QuickTest Professional")Run the following co...
2013-01-10 15:50:00
97
转载 释放指定程序内存
Public Function QTP_Release_Memory(hwnd) Extern.Declare micVoid,"SendMessageA","user32.dll","SendMessageA",micHwnd,micInteger,micInteger,micInteger SC_MINIMIZE = &HF020&...
2012-12-25 17:05:00
222
转载 Ordinal Indentifiers的区别
Index - Indicates the order in which the object appears in the application coderelative to other objects. Location - Indicates the order in which the object appears on the screen. Values areas...
2012-09-26 16:32:00
196
转载 在开启QTP之前运行的程序能被成功识别的特例
The SIEBEL add-in uses SIEBEL Automation API, so if a SIEBEL application islaunched before QTP, QTP will still be able to identify the Siebel objects. This isbecause even though Siebel runs insid...
2012-09-26 09:56:00
84
转载 分层设计方法-GUI层
'这里通过把百度搜索封装成GUI层作为例子来举例:Class BaiduSearchPrivate m_htChildObjects '定义变量作为Scripting.Dictionary'***********为变量设置Get Set方法*************Public Property Get ChildObjects()Set ChildObje...
2012-09-15 21:51:00
256
转载 从QC下载测试脚本
' ================================================================================== '' Download Automation Tests from QC'' 1. get all folders, for each folder:' a. check it h...
2012-09-13 17:35:00
102
转载 批量修改脚本名称
这里举例批量将脚本名的"_"替换成"-"'************************************************************************************************************************ 'Description: ' 'Assumptions: ' There is no unsa...
2012-09-13 17:26:00
104
转载 获取并处理WebTable中的子对象
' ***************************** Function Library ****************************** RegisterUserFunc "WebTable", "ObjectsByMicClass", "ObjectsByMicClass"' Function: ObjectsByMicClass ...
2012-09-13 09:43:00
94
转载 QTP设计模式-类的继承模式
'类的继承模式举例:'创建一个继承类库Class ClassHelperprivate dict'添加方法public default function addMethod(name)set dict(name) = getRef(dict("type") & name)end function'创建字典对象priv...
2012-09-11 15:25:00
120
转载 QTP设计模式-函数指针模式
'函数指针模式举例:'函数tt1Function tt1Msgbox "tt1"End Function'函数tt2Function tt2Msgbox "tt2"End Function'建立测试流函数Function TestFlow(LoadFuncs)'遍历所有载入的函数名,并利用函数指针进行调用For i...
2012-09-11 09:51:00
73
转载 QTP设计模式-回调设计模式
'回调设计模式举例:On Error Resume Next'创建一个类Class CallBack'被调用的对象Dim Caller'回调的动态脚本Dim CallBackScript'类的销毁化Sub Class_Terminate()Execute CallBackScriptEnd SubEnd ...
2012-09-11 09:43:00
85
转载 QTP设计模式-命令包装模式
'命令包装模式举例:'定义一个oCommand类Class oCommand'定义输入Private VarIntNumPublic Property Get NumberNumber = VarIntNumEnd PropertyPublic Property Let Number(ByVal oNum)VarIntNum = oN...
2012-09-11 09:36:00
95
转载 QTP设计模式-工厂设计模式
'工厂设计模式举例:Public oOutputsSet oOutputs = New OutFactoryClass OutFactoryPublic Channels '定义变量Private Sub Class_InitializeSet Me.Channels = CreateObject("Scripting.Dictionary")...
2012-09-11 09:24:00
78
转载 QTP设计模式-单例设计模式
'单例设计模式举例:Option ExplicitPublic oExcel '声明全局变量Class ExcelWrapperPrivate oExcelObject'初始化类Private Sub Class_InitializeDim bAlreadyInit '判断对象是否存在的标志位'检查对象是否已经被初始化bAlready...
2012-09-07 18:04:00
59
转载 打印当前运行到的行号
Print Setting("executionline") + 1转载于:https://www.cnblogs.com/dushuai/articles/2674991.html
2012-09-07 14:15:00
162
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人