Problem with text recognition in new version 3.0.

Hi,

I started working with the new version of Eggplant vrsion 3.0. but facing problem with its new feature of text recognition. :(

While caputuring text image, we need to give the details like the text font, size, text color. Is there any way that the eggplant by itself can recognize the text type and its details??? Because it's difficult to identify the text details like its exact size and style :|

Comments

  • SenseTalkDougSenseTalkDoug ForumAdmin admin
    We recognize that it can be difficult to determine the exact font and size being used by different elements in the interface. We have supplied the attributes for a few commonly-used styles in the predefined text styles for the Mac and Windows platforms to help you get started.

    As you discover the correct attributes for other interface elements, we would encourage you to post that information here on the forum for other users to benefit from. We intend to add more predefined styles in future releases of Eggplant to make this easier.

    One approach that may help you discover the correct attributes is to capture an ordinary image of the text you want to match (using "Capture Image" from the Remote Screen toolbar) and select that image in the Images tab of the Suite so you can see it on screen.

    Next, open the Text Image Sheet (by clicking the Text Image button on the Remote Screen toolbar). Then, with the Text Image Preview section open in the sheet, enter the text in the Text String field, and then try various fonts and sizes while visually comparing the generated preview image to the one you previously captured. It's a bit of a hit-and-miss approach, but may be helpful if you already have a pretty good idea of which font it is.

    A more systematic approach is to write a script that loops through all of the possible fonts, sizes, etc. for a given text string and looks for the generated image of each on the screen. We will post a sample script in the Examples forum soon to show how this can be done.
  • EPJoKEPJoK Member
    If your system under test is a Windows platform, you might want to consider ScreenOCR. ScreenOCR is a convenient way of getting the text font and size for Windows system fonts.
  • PayalPayal Member
    Hi,
    ScreenOCR tool helped me to find out the exact font and size of the text in the Windows platform.

    While capturing the text images from remote Windows, which of the 1 among 2 options - 'MacOSX_10.4' and 'WindowsClassic' is to be selected in 'Platform' combo :?:

    I tried selecting 'WindowsClassic' option, but following error is generated :
    "Error Generating Text Image -- Unable to write Image Info to Text Image Generator <Remote Windows ip>:5899 "

    Also, an error is generated for some fonts like Tahoma when i'm trying to use 'MacOSX_10.4' option in platform, as these fonts are missing from the 'Font' field :|

    Need help in this regard...
  • EPJoKEPJoK Member
    The platform for text images is determined by what OS your system under test is running. For example, creating text images for the windows platform will require the selection of WindowsClassic.


    As for your communication error with the Windows Text Image Generator, are you running the Text Image Generator on your Windows machine? If not, download the executable here:

    http://www.redstonesoftware.com/Download/WindowsTIG.zip
    Also, an error is generated for some fonts like Tahoma when i'm trying to use 'MacOSX_10.4' option in platform, as these fonts are missing from the 'Font' field

    What error message are you getting? The "Tahoma" font should be available for MacOSX_10.4.
  • PayalPayal Member
    Hi... Sorry for late response.

    I downloaded the Text Image Generator "Windows TIG" on my Windows machine. But need to install one of the versions of the .Net Framework:v2.0.50727 to run this application on Windows.

    On selecting 'MacOSX_10.4' option in platform, i'm getting the following error:
    "Error generating Text Image -- Unable to find font Tahoma of size 8.
    Close Image Preview to save command anyhow."

    On closing the Image Preview, the 'Save' button is enabled. After clicking Save button it displays following error:
    "Unable to Generate Text Image."
    And gives the option to "Don't Insert" and "Insert Command in Script". After inserting the command in the script, the script fails giving the same error:
    "Unable to Generate Text Image.
    Unable to find font Tahoma of size 8."

    Actually the "Tahoma" font is not present in the font combo itself. And many other fonts are missing in the combo. So gives error while we type the missing font names in the field. How can the font field be upgraded for other missing fonts :?:
    Or is there any other way out to resolve this error :!:
  • EPJoKEPJoK Member
    If the Tahoma font is not listed as one of the available fonts for the MacOSX_10.4 platform then it means that you do not have that font installed on your Eggplant system. When generating fonts for any system you need to have that font installed.

    The windows fonts are different however, in that any font available on your Windows system will not be displayed in the list of fonts on Eggplant's side. Currently, as of Eggplant v3.01, the list of fonts only reflect the fonts that you have installed on your Eggplant system. You should be able to generate text using fonts installed on your Windows system by typing those fonts in.
  • SenseTalkDougSenseTalkDoug ForumAdmin admin
    Two additional comments:

    Most of the time you shouldn't need to select a font directly from the font list. Instead, you can define a text style on the Text pane of the Preferences panel, and then simply use that style which will set all of the needed text attributes at once.

    Having said that, to use generated text images effectively (no matter how you select the text attributes) you will need to have a live connection to a text image generator (TIG) for the platform you are scripting against. If the SUT is a Mac, you will use the MacOSX_10.4 TIG that is built into Eggplant. If the SUT is a Windows machine, your Text Platform should be set to WindowsClassic and you will need to have a Windows machine on your network that is running the Windows TIG.

    I hope this helps clarify the situation.
  • Hello :D ,

    is the connection to the WindowsTIG necessary at buildtime and runtime? Is it possible to generate Textimages without the TIG installed?

    I ask this, because one of the main advantages of Eggplant is, that you do not need to install other components than a VNC-Server on the machine under test.

    A necessary TIG on the machine under test would be a big disadvantage from my point of view. In this case I would prefer a text recognition feature, scanning the VNC-picture instead of text image creation...

    Kind regards

    Vuko
  • JonathanOSXJonathanOSX ForumAdmin admin
    If you are driving a Windows based SUT then in order to use the Text Image Generation feature for Windows you do need access to a machine running the Windows TIG; however that machine does NOT need to be the same as the SUT machine, just a machine that will render text in the same way.

    For Macintosh there is an embedded TIG within Eggplant so you won't need anything (besides OSXvnc) installed on the SUT.

    Regardless of SUT you can also continue to use the same image capture and compare techniques that are the basis of Eggplant scripts.
  • Jonathan,

    thanks for clarification. Whats about Linux machines?

    Kind regards

    Vuko
  • JonathanOSXJonathanOSX ForumAdmin admin
    At this time we don't have a LINUX TIG so you would need to create a script based Text Image Generator to get Linux Images. Please See these for more information.
      Eggplant Reference->Eggplant Commands->CaptureTextImage Using Eggplant->Images & Image Searching->Text Image Generators [/list:u] However, we designed the TIG protocol to be simple enough that we can write additional ones or provide clear details on how exactly to produce a TIG for another operating system. If anyone would like to work with us to create a TIG for a new operating system (or other font rendering environment) please contact us at [email protected]
Sign In or Register to comment.