Some Time we have to check that particular text is present on page or not during automation. If we get the page outer HTML in QTP we can not get the whole text of all element like frame , webtable . div.etc…
So i created a function which will check that the given text is present on page or not If Text present on page it will return True else False
REM ——- Set page object ———-
set objpage = Browser(“BrowserName”).Page(“Pagename”)msgbox VerifyTextPresentOnPage(objpage ,”rajiv” )
Function VerifyTextPresentOnPage(byval objpage , byval Textvalue )
On error resume next