How to validate data displayed in the label format.

Hi All,

How can i validate the data which is displayed in the form of lables???
Say for example in the version window for an application, the version number is displayed in the form of label, which cannot be selected and copied to clipboard.
:idea: One way which we can do this is taking the image of the displayed version and validate. But this will become real hectic for the kind of application i'm working for. Hence i'm looking forward for some other method to handle this.
The application i'm working on displays few data in the form of labels display, after estimating the inputs given to the application. This data i'm not able to copy from the UI of the application.

Please suggest any other way for the same. :!: :!: :!:

Comments

  • Payal--

    This sounds like a job for a TextImage.

    I'll give a quick overview, but you will want to check out text image generation in the Eggplant docu.

    What it boils down to is you need to do two things: Install and run the eggplant TIG app (found in the system under test utilities folder on your eggplant dmg) on your SUT (make sure you install it as a startup item).

    Then determine the font style that your labels are displayed in on the windows interface. There are two really easy ways to do this. Grab screenOCR (a google search will turn it up) to determine it, or ask your engineers what font, color, style, etc the text is. You will want to take this information and create a text style in the WindowsClassic platform in the text preference pane of the Eggplant preferences. Again, read the eggplant text image generation docu to get a full understanding of just how this stuff works.

    After setting it up, here's how I'd do it:

    put "verification text" into verifyThis --assign to a variable

    if imageFound (text:verifyThis,TextPlatform:"WindowsClassic",TextStyle:<yourlabelstyle> )
    put "passed" into theResultList --or whatever reporting you're using.
    end if

    I probably didn't explain this as well as I could have (it's still early for me :wink: ). But I'd be happy to answer more questions.

    TIP: Once you get the TIG setup. I always need to experiment to get the syntax and style correct. What I do is I keep a blank script open, and then use the "Text Image" button in the active connection window to dump code into that blank script. Then I cut/paste into the script I'm actually working on. This way you can try different styles and platforms to figure out what the syntax can actually be.

    Hope this helps

    Allen
  • JonathanOSXJonathanOSX ForumAdmin admin
    On Windows XP the best tool we have found to do this is ScreenOCR.

    This inexpensive program allows you to "copy" text from places that are generally not clipboard accessible.
  • Hey Jonathan--

    Is there a similar tool for OSX?
  • JonathanOSXJonathanOSX ForumAdmin admin
    Unfortunately not.

    The problem is the dynamic nature of Mac OS X's text renderring engine -- it looks nice but it's very difficult because letters of the exact same specifications (font, size, color) can literally be renderred in countless ways.

    We also hear that ScreenOCR does not work with Vista which has some similar renderring features.
  • PayalPayal Member
    Thanks a lot. This method works.

    But i have observed 2 more thing while working with the text image.
    1. I observed that this method doenot work for all the text displayed in the UI. Say the title bar text and also with few fonts. So are there any restriction to work with text image property :?:
    2. Other thing is, ScreenOCS gives different font for the same text when used thru 2 different machines :roll: This confused me little. So ScreenOCR usage also define any limitation :?: IS this because of the font support in the system :!:
  • JonathanOSXJonathanOSX ForumAdmin admin
    1: You might have a hard time in the title because of a gradient (changing color) in the bar, you might try keeping the selection very tight or changing your display settings in the display preferences area (Right click on the desktop and choose Properties then Appearance).

    2: Those same settings might be the cause of your different fonts on two separate systems. We usually recommend establishing a fixed set of display settings and "saving them" to restore on any SUTs.
Sign In or Register to comment.