I am trying to locate elements with generated ids wherein some part of the ID is known; for example:
id=\"page_x002e_x0023_default-create-firstname\"
If you want to go down the xpath route then you could use contains(), like this:
contains()
//*[contains(@id,'_default-create-firstname')]
This will search the entire page for an id that contains the text "_default-create-firstname". It can be easily made more specific