TIG is not working for me. Forgive me if I am missing any key elements :roll:
- installed TIG on Target machine
- open notepad in Target machine
- Set the font,size,bold through Fonts option
- Type ‘Test’ in notepad.
- specify the rectangle
- now tried executing following code on my eggplant machine
- I was exepecting it will capture the image for me in Imagefolder in current suite, but there is no image.
Set Font to “Courier”
Set Size to 10
Set text to “Test”
set bold to true
Set rec to ((1,39),(101,61))
put (Font:Font,Size:Size,text:text,rec:rec,bold:bold) into textImage
You’re mixing modes. The TIG executable generates images based on the properties you specify and returns them to eggPlant. Calls to the external TIG are made as part of a call to an image-based command or function, e.g.:
Click (text:"eggplant", textSize:10, textFont:"Courier")
Assuming your Text Preferences are configured to use the external TIG, the above code will communicate with the TIG executable, which will generate the image of the text and return it to eggPlant, which will then search for that text on the screen. The image will be cached in case the same string is needed later in the script, but it will not be written to disk.
It’s possible to tell eggPlant to save the text images to disk for the external and scripted TIGs, but they would not be saved to the Images directory, rather they would be stored in a TextImages directory, which is otherwise not normally created.
Your use here of the CaptureTextImage command is incorrect as it is only used with the scripted TIG. You also used incorrect property names, like “Size” and “Rec”.
I hope this response combined with those I have made to your other posts helps to clarify the options for finding text with eggPlant.