Columns w/ no distinguishing marks using everyimagelocation

I hope someone can help me with this problem I am having.
Following scenario:
I have to verify that several specific columns were loaded after opening a list
I am using the everyImageLocation to determine if these specific columns have been loaded or not - to do this I captured all column captions/headers.
if the number of items in everyImageLocation(code)=1
then log "bla"
else throw "One or several default columns not found"
Problem is more than two column headers contain the same word
for example:
code, xcode, ycode
and eggPlant recognizes them as the first "code" column and counts two more columns to the list.
These are plain winforms columns which means there are no other distinguishing marks about them.

So what do I do wrong? Or how can I fix this?

Thanks in advance

Comments

  • EggplantMattEggplantMatt ForumAdmin admin
    Why are you using everyImageLocation() here? Is there the possibility that a column is displayed more than once, and that is the error you are checking for? If not, I would recommend that you just use the imageFound() function:
    if imageFound("code") then
        log "blah"
    else
        throw "someError"
    end if
    
    If you're using a captured image of the word "code", then just capturing some white space to the left of it as part of the image would be enough to prevent it from matching things like "xcode" and "ycode".

    The best thing to do when you have questions of this kind is to open a support case by emailing TestPlant support. It's helpful if you provide screenshots and detailed explanations of what you are trying to accomplish.
Sign In or Register to comment.