Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
trying to test that field doesn't have numeric characters
#1
Not Solved
Trying to check if a field "Last" has numeric characters in field, if so to say so. I tried incorporating some code found on line with mine but getting errors. Can anyone help?

**Below is My Code to test field is blank , this part works ***
Browser("Browser1").Page("page").WebEdit("WebEdit_2").Set datatable("Last")

Dim ValTxt2, objRegEx, colMatches
ValTxt2= Browser("Browser1").Page("page").WebEdit("WebEdit_2").GetROProperty("value")

If ValTxt2="" Then

Browser("Browser2").Page("page2").Output CheckPoint("browser3")

Else
*************************************************

** downloaded code below is giving the trouble when trying to incorporate with top code**
objRegEx.Global = True

objRegEx.Pattern = “[0-9]”


strSearchString = ValTxt2


Set colMatches = objRegEx.Execute(strSearchString)  


If colMatches.Count > 0 Then

    Wscript.Echo “The following characters are not allowed:”

    For Each strMatch in colMatches

        Wscript.Echo  strMatch.Value

    Next

End If

End If
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  When ObjectSpy doesn't show Object Hierarchy sevenwhite 2 3,214 09-24-2012, 06:41 PM
Last Post: Ankesh
  Regular Expression- For a Numeric rajeshvelur 3 3,273 11-29-2008, 11:04 PM
Last Post: surya_7mar
Question How to chach no of characters in Textbox with the use of Reguler Exp. chetan-24 2 3,372 09-30-2008, 07:36 PM
Last Post: chetan-24
  How to check if string contains only numeric value if range is not given blanchedsouza 3 3,937 09-19-2008, 11:17 PM
Last Post: kishoreinchennai

Forum Jump:


Users browsing this thread: 1 Guest(s)