TESTEVERYTHING

Showing posts with label webpage. Show all posts
Showing posts with label webpage. Show all posts

Wednesday, 27 July 2011

VB Get All Web page text ( Including All Webelement )

Hi All,
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

Which one is right ?

Translate







Tweet