I've got not very common task to take care of.
We need to create several test suites for some forms in one complex web application. I'm a rookie in this field and Selenium was the first (and pretty much advertised all around) tool I've tried. The problem is that all of form elements' ids/names/css path used on aforementioned pages contain random fragments which will change each and every time corresponding page is refreshed (they still contain enough of unique characters to distinguish between with certainty, with, for example, regular expressions).
When I'm telling "random with enough unique characters ", I mean something similar to that:
constant_part_1_random-fragment-new-each-time_constant_part2
Those constant parts by itself unique enough to discern different elements by them, but you can't use exact matching as the whole string changes every time. So Selenium creates test suites in full-auto mode OK, but when I try to run it - BLAM! - it doesn't work because all element locators in each step of newly composed test suite now contain already stale path/names/ids, so no element can be found.
Of course, regular expressions was the first solution that came to my mind, but I failed to comprehend can they be used in Selenium at all, and if they can, than can they be used in locators? Some people around the net tell they can't, others say they can..
Or may be it's Selenium who is flawed? May be there are better solutions of this sort which will allow me to quickly compose those test suites? Or at least will be able to use regexps to their fullest?