上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页

2012年7月1日

QTP截IE滚动条全屏问题的完美解决办法

摘要: QTP截IE滚动条全屏问题,困扰了好久,一直没有好的解决办法。虽然网上流传有好多的工具,这些工具有这样那样的接口供QTP去调用,但是这些工具都有点老了,例如:snagit,ScreenCapture_Setup_v1.1.1对于IE8或IE8以上的版本就不支持了,或者WIN7/64位的系统也不支持了。我的试验环境:win7/64位 QTP11 IE8试验工具:ScreenCapture_Setup_v1.1.1试验代码:Function QTPIECapture(CaptureObj)Dir = "C:\ImageBMP.PNG"hwnd = CaptureObj.GetR 阅读全文

posted @ 2012-07-01 11:25 张飞_ 阅读(1569) 评论(2) 推荐(1) 编辑

2012年6月21日

截全屏工具介绍

摘要: http://snapsie.sourceforge.net/备忘 阅读全文

posted @ 2012-06-21 12:05 张飞_ 阅读(336) 评论(0) 推荐(0) 编辑

2012年6月11日

VBS生成随机数

摘要: Function GetRandomMath(m,n) Randomize GetRandomMath = Int(((n-m+1) * Rnd) + m)End Functionmsgbox GetRandomMath(20,30) 阅读全文

posted @ 2012-06-11 23:07 张飞_ 阅读(6596) 评论(0) 推荐(0) 编辑

2012年6月5日

VBS类似于ceil的函数

摘要: Function ceil(n,m) temp = n/m If Int(temp)/temp=1 Then ceil=temp Else ceil=Int(temp)+1 End IfEnd Functionmsgbox ceil(4,5)msgbox ceil(5,5)msgbox ceil(6,5)msgbox ceil(9,5) 阅读全文

posted @ 2012-06-05 13:11 张飞_ 阅读(447) 评论(0) 推荐(0) 编辑

2012年6月1日

vbs的sort(数组排序)

摘要: Function fSortArray(aSortThisArray)Dim oArrayList, iElementSet oArrayList = CreateObject( "System.Collections.ArrayList" )For iElement = 0 To UBound(aSortThisArray)oArrayList.Add aSortThisArray(iElement)NextoArrayList.Sortset fSortArray = oArrayListEnd Functionmyarray=Array(50,20,30)MsgBox 阅读全文

posted @ 2012-06-01 00:31 张飞_ 阅读(2872) 评论(0) 推荐(0) 编辑

2012年5月15日

wd中使用jquery(转载)

摘要: 转载于http://blog.csdn.net/nbkhic/article/details/6897089<html> <head> <title>FireEvent</title> <style> .mo {color: blue;} .tips {display:none;border: 1px solid #ccc; background-color:#EFEFEF;width: 100px;height:100px} </style> <script> function show_tips(){ do 阅读全文

posted @ 2012-05-15 01:17 张飞_ 阅读(290) 评论(0) 推荐(0) 编辑

ruby字符串符号

摘要: 1.<<ENDEND2.%{}3.""4'' 阅读全文

posted @ 2012-05-15 00:55 张飞_ 阅读(251) 评论(0) 推荐(0) 编辑

js操作dom对象

摘要: DOMDocument 属性和方法 最近发现DOMDocument对象很重要,还有XMLHTTP也很重要注意大小写一定不能弄错.属性:1Attributes 存储节点的属性列表(只读)2childNodes 存储节点的子节点列表(只读)3dataType 返回此节点的数据类型4Definition 以DTD或XML模式给出的节点的定义(只读)5Doctype 指定文档类型节点(只读)6documentElement 返回文档的根元素(可读写)7firstChild 返回当前节点的第一个子节点(只读)8Implementation 返回XMLDOMImplementation对象9lastChi 阅读全文

posted @ 2012-05-15 00:00 张飞_ 阅读(359) 评论(0) 推荐(0) 编辑

2012年5月10日

ruby的ObjectSpace.each_object的用法

摘要: class Testendat_exit do ObjectSpace.each_object(Class) do |klass| if klass.superclass == Test klass.new.methods.grep(/^test/) do |method| klass.new.__send__(method) end end endendclass A < Test def test_a_1 puts "a_1" end def test_a_2 puts "a_2" end endclass B < Test def te 阅读全文

posted @ 2012-05-10 13:32 张飞_ 阅读(653) 评论(0) 推荐(0) 编辑

2012年5月9日

ruby实例变量与类变量

摘要: 以@开始的变量是【实例变量】,实例变量属于特定的对象。class Persondef initialize(name, gender, age) @name = name @gender = gender @age = ageendend上面的例子中,@name, @gender,@age都是实例变量。可以在类或子类的方法中引用实例变量。若引用尚未被初始化的实例变量的话,其值为nil。【类变量】被一个类的所有实例对象共享,也可以被类方法访问到。类变量名以‘@@’,开始,例如‘@@number’。和全局变量,实例变量不同,类变量在使用前必须初始化:class Person@@numb... 阅读全文

posted @ 2012-05-09 21:20 张飞_ 阅读(2787) 评论(0) 推荐(0) 编辑

2012年5月3日

ruby符号的应用

摘要: $!:最近一次错误信息$?:最近一次执行的子进程退出的状况$$::解释器进程ID$*:命令行参数$0:Ruby当前运行程序的文件名$\:输出记录分隔符$/:输入记录分隔符$=:是否区分大小写标志$n:最近匹配的第n个子表达式$~:自表达式组的最近一次匹配$&:最近一次同正则表达式匹配的字符串$.:解释器最近读的行数$_:gets最近读取的字符串$@:错误产生的位置 阅读全文

posted @ 2012-05-03 13:49 张飞_ 阅读(350) 评论(0) 推荐(0) 编辑

2012年4月20日

ruby中正则表达式最小匹配与最大匹配

摘要: 正则表达式中,默认的是最大匹配,即贪婪模式,但有些时候,要最小匹配,请看下面的例子:(ruby)str = "abbbbbdwwdwwwede"puts str[/a.*(dw)/]结果为:abbbbbdwwdwstr = "abbbbbdwwdwwwede"puts str[/a.*?(dw)/]结果为:abbbbbdw即在需要最小匹配的字符前面加上?,就变成了最小匹配了,即非贪婪模式。 阅读全文

posted @ 2012-04-20 01:12 张飞_ 阅读(2445) 评论(0) 推荐(0) 编辑

2012年4月6日

QTP如何检查WEB对象是否隐藏

摘要: 在WEB页面中隐藏对象的3种方式1、使用display例如:<label id="hiddenMessageDisplay" style="color:blue">This message is hidden using CSS display property</label><input onclick="if(this.value=='Show message'){this.value='Hide message';document.getElementById('hid 阅读全文

posted @ 2012-04-06 17:27 张飞_ 阅读(1342) 评论(1) 推荐(0) 编辑

2012年3月20日

VBS生成XML文件

摘要: Dim xmlDoc, rootEl, child1, child2, p'创建XML文档Set xmlDoc = CreateObject("MSXML2.DOMDocument")'创建根元素并将之加入文档Set rootE1=xmlDoc.createElement("BookStore")xmlDoc.appendChild rootE1'创建并加入子元素Set bookchild1=xmlDoc.createElement("book")Set ISDNAttribute=xmlDoc.createA 阅读全文

posted @ 2012-03-20 14:47 张飞_ 阅读(3624) 评论(0) 推荐(0) 编辑

2012年3月7日

QTP设置默认语句

摘要: 目录\Mercury Interactive\QuickTest Professional\dat下面新增ActionTemplate.mst的文件,每次新建测试的时候,可以将以下信息自动加载到测试脚本里边 阅读全文

posted @ 2012-03-07 11:46 张飞_ 阅读(195) 评论(0) 推荐(0) 编辑

上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页

导航