How to use Find command

Compare with regular text editor, we can press Ctrl F key to bring up a search menu to find a text in a document. How do we use the same behavior in Eggplant? I have to search a keyword “Anniversary” in one thousand pages in the SUT.

Currently, the codes are created like this:

repeat while not ImageFound “Annversary Image”
click “the downarrow button”
end repeat

With this method, eggplant tries to find the keyword in each page, if it can’t find it, the downarrow button is pressed. This process repeats until the keyword is found. However, it takes a long time to find it.

Pleasae direct me where the topic is described in Eggplant manual and your suggestions how to efficiently make this task work.

Thanks,

What is the specific task you are trying to accomplish in looking for this text? Knowing the details of why you are trying to locate this text might make a difference in how we would suggest scripting it.

The task is to verify several data content in a big chunk of datafile if they are correct. The data is located in a section of textfile. The textfile has appromately 300 ~ 1000 pages. Normally, the find command is used to find the data in the particular section and then the data contents are verified.

I have browse Eggplant user manual but I can’t find the information. I would greatly appreciate it for your inputs.

Thanks,

Well, you can just script the same action that you do manually:

TypeText controlkey & "f"
TypeText "Anniversary"
repeat until imageFound("someIndicationThatYourDone")
      Click "FindNextButton"
      put repeatIndex() into theCount
end repeat
log "# found:" & theCount - 1 // theCount should be 1 higher than the number actually found