SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 9 of 9
  1. #1
    Advanced Member
    Join Date
    Sep 2011
    Posts
    524
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    GetVisibleText is returning blank

    Hi,

    I am trying to extract the text that is pasted as picture from powerpoint with the help of GetVisibleText method, however, it is returning blank value instead of visible text

    One more thing is: it is working on my host machine but not working on one of my VMs on which I use to develop script.

    On both machines, OS is the same and Office version is also same

    Note: I am using Office 2007

    Code that I am using is(Name with which PPT file is saved is Dummy1):

    msgbox Window("regexpwndclass:=.*FrameClass.*").Window("r egexpwndtitle:=Dummy1.*","regexpwndclass:=mdiClass ").WinObject("text:=Slide","nativeclass:=paneClass DC").GetVisibleText

    Can anyone please help me in resolving this issue?

  2. #2
    Member
    Join Date
    Jan 2008
    Location
    China
    Posts
    89
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: GetVisibleText is returning blank

    haven't met your case, but you may double check if the option General -> Text Recognition in both are the same.

  3. #3
    Advanced Member
    Join Date
    Sep 2011
    Posts
    524
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: GetVisibleText is returning blank

    Options in both are the same...

    I have resolved this issue:

    The issue was: in Tools > Options > Text Recognition > Multiple Text Block Mode was selected.

    Need to change it to Single Text Block Mode

    what is happening is:

    If I select Single Text Block Mode in Settings, then GetVisibleText is working if one/multiple picture is pasted

    If I select Multiple Text Block Mode in Settings, then GetVisibleText is working only if multiple pictures are pasted

    Doesn't work if single picture is pasted..thats what my case was

    If one/multiple picture is pasted, then GetVisibleText is working if Single Text Block Mode is selected in the Settings.

    Can anyone please let me know, whats the purpose of Single Text Block Mode and Multiple Text Block Mode?

  4. #4
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,555
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: GetVisibleText is returning blank

    The help file covers the difference in detail with an example. Just look up 'text recognition'. Basically switches the algorithm around telling it whether to expect multiple font types/backgrounds or not.

    Note that the help also discourages using GetVisibleText in the first place since it is unreliable.

  5. #5
    Advanced Member
    Join Date
    Sep 2011
    Posts
    524
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: GetVisibleText is returning blank

    Thanks. It is unreliable, however, to extract text from the picture, this is the only method provided by QTP. So, we only have to rely on this.

  6. #6
    Junior Member
    Join Date
    Nov 2011
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: GetVisibleText is returning blank

    Try Using GetContent()
    Hopefully this will work..

  7. #7
    Advanced Member
    Join Date
    Sep 2011
    Posts
    524
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: GetVisibleText is returning blank

    Thanks Reshu. We will try to use that as well. Can anyone please let us know if it is reliable if anyone has used it?

    Note: While using GetVisibleText, we got into some problem where it is identifying Cell1 as Cam so, we have to enlarge the text before using GetVisibleText to rectify this issue.

    Still, it was picking some extra text in some other situations, so we did not find this as much reliable.

  8. #8
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,555
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: GetVisibleText is returning blank

    You may be better off using a bitmap comparison or other picture verification tricks like checking file size/dimensions/etc. Presuming anyway that you just need to check that the picture is "right" and not extract some dynamic text from it.

  9. #9
    Advanced Member
    Join Date
    Sep 2011
    Posts
    524
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: GetVisibleText is returning blank

    Thanks NoUse4aName for reply.

    You may be better off using a bitmap comparison
    - By this, are you referring to Bitmap Comparision? If yes, then I find that it is not very reliable. If no, then can you please point me to the right direction?

    or other picture verification tricks like checking file size/dimensions/etc.

    - Can you please let me know, how to check picture size, dimensions etc?

    Presuming anyway that you just need to check that the picture is "right" and not extract some dynamic text from it.

    - Yes, I need to check that what I have pasted is actually picture and text of the picture is correct.

 

 

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 10.00%
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 02:17 AM.

Copyright BetaSoft Inc.