How to click an image in sfBrowser (symfony lime testing)

This is probably a really simple point, but it actually took me a few searches and tries to find the answer – but it’s quite simple really, just use the image’s alt tag attribute.

If you are using the symfony image_tag helper and not specifying your own alt attribute, then it will be the image name minus the extension, for example – if your template contains this link:

 

then in your Functional test, use:

$b->click("fred");