How can I store the random ID?

Is more simple to do need an xpath starts-with

Read here