Hi Saisu,
Got the problem. You object has large text with the expected msg in it. something like [xyzvjhjgjhhjh "O Records Found" hsgfjhskh]
I have modified the code accordingly.
Can you please tell me from where are you picking the value for GEOVoIPnumber. Does it change everytime?
if not.. use the below code......
'-------------------------------CODE--------------------------------
'-------------------------------END------------------------------------
If you need to change the value of GEOVoIPnumber every time the above code will work with slight modification.
I hope this will work for you this time.
Regards,
Ankesh
Got the problem. You object has large text with the expected msg in it. something like [xyzvjhjgjhhjh "O Records Found" hsgfjhskh]
I have modified the code accordingly.
Can you please tell me from where are you picking the value for GEOVoIPnumber. Does it change everytime?
if not.. use the below code......
'-------------------------------CODE--------------------------------
Code:
intFlag = 0
Do
Browser("Browser").Page("Page").Frame("toolbar").Link("Customer Search").Click
Browser("Browser").Page("Page").Frame("workarea").WebEdit("v_value").Set GEOVoIPnumber
Browser("Browser").Page("Page").Frame("workarea").WebButton("Search").Click
strResultMsg= Browser("Browser").Page("Page").Object.innertext
'chk for the message
If Instr(strResultMsg,"0 records returned")>0 Then
msgbox"Please procced to build"
Exit Do ' Exit the loop
intFlag =1
End If
Loop Until intFlag =1
'-------------------------------END------------------------------------
If you need to change the value of GEOVoIPnumber every time the above code will work with slight modification.
Code:
intFlag = 0
Do
Browser("Browser").Page("Page").Frame("toolbar").Link("Customer Search").Click
‘-------- Put your code here to fetch the next value of GEOVoIPnumber-----------
‘ Code to fetch the value of GEOVoIPnumber
‘-------------------------------------------------------------------------------
Browser("Browser").Page("Page").Frame("workarea").WebEdit("v_value").Set GEOVoIPnumber
Browser("Browser").Page("Page").Frame("workarea").WebButton("Search").Click
strResultMsg= Browser("Browser").Page("Page").Object.innertext
'chk for the message
If Instr(strResultMsg,"0 records returned")>0 Then
msgbox"Please procced to build"
Exit Do ' Exit the loop
intFlag =1
End If
Loop Until intFlag =1
I hope this will work for you this time.
Regards,
Ankesh