SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Senior Member
    Join Date
    Aug 2007
    Posts
    134
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Check for existance of text on the page

    Hi,

    Is there any way, where i can check for existance of particular text on Page. I do not want to use text checkpoint. I want it as a function where I can pass the text that I need to check as argument to function.
    I tried with GetVisibleText but it works only for text that is visible on the screen and not on whole page.
    I even tried to use childObjects of page, where I used html tag as "body" and "micclass" as "WebElement". Do a Instr with the contents of these childobjects. But this is not working in all the cases.
    Please let me know if there is any other way with which we can check the text that is displayed on the page.

    Thanks,
    VM

  2. #2
    Super Member Jonty's Avatar
    Join Date
    Jan 2007
    Location
    India
    Posts
    1,266
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Check for existance of text on the page

    What is the text being recognized as ?
    Do a spy and check the actual object class as known to QTP.
    Cheers
    Jonty..
    -- Here to Learn and share ---

  3. #3
    Senior Member
    Join Date
    Aug 2007
    Posts
    134
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Check for existance of text on the page

    It is webelement. But I am looking for some thing where I can just check for existance of text. It can exist any where on the page.


    Thanks,
    VM

  4. #4
    Super Member Jonty's Avatar
    Join Date
    Jan 2007
    Location
    India
    Posts
    1,266
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Check for existance of text on the page

    I am not sure if there a method to retrieve the displayed text from the page.
    If the object is webelement, then child objects would be way to go, but that doesnt seem to solve the purpose.

    Do you know what is text you are looking at?
    One workaround i can think is to click on the page and copy the contents, paste or use the clipboard object and see if it helps.
    Cheers
    Jonty..
    -- Here to Learn and share ---

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:57 PM.

Copyright BetaSoft Inc.