Function regEXfun(patrn,strng)
Dim regEX,Match,Matches
Set regEX = New RegExp
regEX.Pattern=patrn
regEX.IgnoreCase=False
Set Matches =regEX.Execute(strng)
Set Match=Matches(0)
RetStr=Match.value
regEXfun=RetStr
End Function
Dim preNO,newNO
preNO=Browser("xx").Page("xx").WebElement("NO").GetROProperty("innertext")
newNO=regEXfun("ABC……..",preNO) '虽然每次NO都不一样,但是格式是固定的:字符串长度总是11位,以ABC开始,后面的数字是随机,所以用ABC来匹配字符串
DataTable.Value("NO",dtGlobalSheet)=newNO
8、密码
如果登录页面的密码数据来源是data table,那么要提前准备密码。显然只能用明文,比如123456,