SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Mar 2005
    Posts
    23
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Strange effects using CaptureText

    Hi,

    when I use CaptureText to grab words out of a Grid TP reads signs, which are not visible on the screen.

    These maybe tabs, but also ">", "!" and few more appear according to the language on the AUT.
    CPWR says, this must be some kind of control-signs - but there are definetly none.

    When I use a TextCheck, TP records the content of the cells correctly (without this strange characters), but the labels of the grid are partially not correctly recognized (it records the last character twice at some words).

    Any help / ideas would be very appreciated.

    thank you,
    gerrit

  2. #2
    Junior Member
    Join Date
    Jul 2005
    Location
    Hamburg / Germany
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Strange effects using CaptureText

    I mean that this words are Tabs or signs for a new line or somethink like this

    what happens when you put the captured string into a MsgBox?

  3. #3
    Junior Member
    Join Date
    Mar 2005
    Posts
    23
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Strange effects using CaptureText

    The captured string looks like this:



    gerrit

  4. #4
    Senior Member
    Join Date
    Sep 2004
    Location
    Toronto, Canada
    Posts
    555
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Strange effects using CaptureText

    How is the string displayed in the above example within the grid itself? What language is the string in? Within the VB editor, the tooltips that appear during debugging don't support displaying control chars, but they also don't support displaying double-byte chars or special chars in a font you might be using to display the text in the grid.

    I'd guess that one of the above is the reason for the boxes. Not sure about the other chars.

    Why not step through each character and print out the ascii value using the ASC function;
    (turn on the immediate window)
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">sTmp = &quot;This is a test&quot; &amp; Chr(34) &amp; &quot;this text is in quotes&quot; &amp; Chr(34) &amp; vbCrLf &amp; &quot;New Line&quot;
    MsgBox sTmp
    For X = 1 To Len(sTmp)
    Debug.Print X &amp; &quot;: &quot; &amp; Mid(sTmp, X, 1) &amp; &quot;=&quot; &amp; Asc(Mid(sTmp, X, 1))
    Next</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Aracknid.
    TestPartner:
    Current AUT running test scripts on TP 6.3 build 183, SQL 2000 DB.
    Legacy AUT running on TP 5.6.0 Build 81 and TP 6.2 build 449 with SQL 2000 DB.

    Test Environment:
    TP/IE Clients on VMWare ESX 4.1 server, AUT Servers on VMWare ESX 3.5 server.

    Application Under Test (AUT):
    Client/Server based, IE 7/8 interface with SQL 2005/2008 DB.

    Automating with TP since August 2004.

  5. #5
    Junior Member
    Join Date
    Mar 2005
    Posts
    23
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Strange effects using CaptureText

    Aracknid, I use asc to filter the strings and it works. But what if there are really some unwanted characters in the cells? These would be cutted, too, and nobody would get to know.
    I printed the captured strings into the immediate window. Here's an example how the box looks (in german language):




    These are the dimensions of the captured area (height is 16) and the uncutted as well es cutted strings of the immidiate window:

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Top left = 54, 57. BoxWidth = 50
    String as captured: Wyl.##)),,2
    Cutted string: Wyl.

    Top left = 54, 57. BoxWidth = 50
    String as captured: Ki
    Cutted string: Ki

    Top left = 56, 57. BoxWidth = 50
    String as captured: Desligar
    Cutted string: Desligar

    Top left = 54, 57. BoxWidth = 50
    String as captured: Från##)),,/
    Cutted string: Från

    Top left = 45, 57. BoxWidth = 50
    String as captured: Uit ##&amp;
    Cutted string: Uit

    Top left = 68, 57. BoxWidth = 50
    String as captured: Desc.$$))//1177::=
    Cutted string: Desc.

    Top left = 84, 57. BoxWidth = 50
    String as captured: Spento288&gt;&gt;AAGGJJP
    Cutted string: Spento

    Top left = 80, 57. BoxWidth = 50
    String as captured: HORS&quot;%%'',,1177==CCFFL
    Cutted string: HORS

    Top left = 54, 57. BoxWidth = 50
    String as captured: Off##)),,.
    Cutted string: Off

    Top left = 46, 57. BoxWidth = 50
    String as captured: Aus!!$$*
    Cutted string: Aus</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">As you can see, there are different signs according to the language - but in two languages the original string is ok, no need to cut them.

    Additionally, I tried "TextCheck". Surprisingly this method works with the cells (no mysterious chars in there), though two labels ("Reset" and "Trigger") have the last character recorded twice:



    In this box CaptureText records: Aus!!$$*
    TextCheck records the word as it should.

    Thank you so far,
    gerrit

    [ 07-14-2005, 12:39 AM: Message edited by: gerrit ]

 

 

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.34%
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 08:19 AM.

Copyright BetaSoft Inc.