I would like to include the version number of my application when reporting the test execution results. If I can read the version of the image, I would copy it to the clipboard , then write it into a file. I would later call the file from my reporting suite. Can anyone help me with copying text as string, from the image into the text file? Thanks a lot.
If you can select and copy the text and then get it from the clipboard, that is the easiest and preferred approach. If it’s not possible to select and copy the text, then we have a script that matches images of the individual characters against the string and then recreates the string based on which characters are found and in what order.
Sorry for resurrecting an older thread but I have been banging my head against the wall trying to figure out how would I use eggplant to test a list box.
I need to get the full list of options in the list box and then choose them at random. I am completely stumped at how to get it to give me a list of the options.
Would I need this script for my list?
hi EggplantMatt, you mention there is a script that tries to get the text from an image. Where is this script? Could you add a link to get it?
We don’t like to just throw that script over the fence. There’s some initial setup to do and we like to start people out with at least one example that will work in their local environment. If you can send a full-resolution screenshot to support via e-mail that shows the text you are trying to read, we’ll be glad to do the initial setup on the suite and e-mail it to you.
Is it also possible to read and image and determine text attributes? I am trying to create a text style, but I don’t know the font or size of my text…any help would be much appreciated!
When trying to work out the settings, the recommended methods for determining the correct Windows font properties are:
a) If it’s a standard system font, you can usually work out what it is by opening the display preferences on the SUT, and going to the Appearance tab and opening the Advanced settings panel:
Tahoma is the standard font for the Windows interface in XP. In Vista and Windows 7 it’s a font called Segoe UI. Note that Segoe UI does not appear in the font dropdowns in eggPlant, but you can type it into the combo box. What matters is the fonts that are installed on the SUT, not the fonts in eggPlant’s list (which is a static list – not dynamically generated.)
b) If it’s not a standard system font (i.e., another font has been deliberately chosen for the UI), ask the developers. Have them make any font specifications part of the deliverables for a build.
c) Guess. If neither of the above works (one or the other usually does), you can usually figure out fairly easily what size range you are looking at, and by close examination of the characters you should be able to figure out what font is being used. It’s rare that an obscure font is used, and unless it’s a font that’s embedded in a Flash application, it needs to be a font that exists on the SUT. This is a situation where WordPad or NotePad can help as you can type the string that you’re going to be looking for and apply different font parameters to it until it looks right, then use those parameters in the Text Image panel.