How to Read different dynamic Text using similar image.

Hi,
In my application have similar images with different Text value.
For below code i used to read text from similar images:
Put everyimageLocation(“Image1”) into Locations
Click item 2 of Locations
Put Item 2 of ReadText(“Image1”) into Value
Put Value

I above code, displaying Similar image count and clicking the item 2 of image cotrrectly. but, its not read the item 2 Text value.

If i give “Put item 1 of ReadText()”.it displaying correct item 1 value.

Kindly help me to read the similar image text values.

Thanks
HariRagavenderan

Sorry for asking the question instead of answering hoping you might get answers for dynamic text

In my application am having different columns as

Name - Results
Address- Results
city -Results

*Results mentioned above are dynamic vary from single to multilines how to capture such images and validate.

In both of these cases it would help to see a screenshot of what you are working with.

hi,

Have highlighted comments and validation results section in screen both are dynamic . for static text am validating like

put readtext(“imagelu”,“imagerb”) into a
log a

and matching log a with my excel data but dynamic text how can i set the rectangle capture because it keeps on changing .

Attached screen for reference

In this situation I would HIGHLY suggest that you use the Clipboard to extract the text you are trying to validate.

That will be a much more reliable approach for what you are trying to achieve. Especially when there are proper nouns and numbers in the text.

hi jonathan,

pls can you explain in detail about extracting text using clipboard,
thanks in advance

Hello,

You will first need to script the selection of the text, either by clicking (double or triple), or using DragandDrop. To triple click, use the code here: http://docs.testplant.com/?q=content/tripleclick

Then use a TypeText command to copy or cut the text, like this:

TypeText ControlKey, "c"
//OR
TypeText CommandKey, "c"

You can get clipboard text by using the RemoteClipboard() function. Read about this function here: http://docs.testplant.com/?q=content/text-commands-and-functions#remoteclipboard