Public var_GetROProperty
var_GetROProperty = Browser("查询页面").Page("查询页面").WebElement("共 21 条").GetROProperty("innerText")
str1=Instr(var_GetROProperty," ")
''**********替代字串函数
Function ReplaceTest(patrn, replStr)
Dim regEx ' Create variables.
Set regEx = New RegExp ' Create regular expression.
regEx.Pattern = patrn ' Set pattern.
regEx.IgnoreCase = True ' Make case insensitive.
ReplaceTest = regEx.Replace(var_GetROProperty, replStr) ' Make replacement.
End Function
'*********剔除获取变量字符串的空格,并去掉第一个及最后一个字符
Dim str1,str2,str3
Do while str1<>0
str1=Instr(var_GetROProperty," ")
str2=ReplaceTest(" ","")
var_GetROProperty=str2
Msgbox str1
Msgbox str2
Loop