'How to save a value from testing process?

I'm testing booking web page. And in one of the steps I need to save a generated value and then at the end of testing to use it. The problem is that I just do not know how to do it :) I believe that it is really simple to do, but anyway need some help with it.
Here is the whole process:
Log in -> Book a room -> Here is a page with My booking ID (this value I need to save) -> Another page where I need to use that generated ID
How to save it on that step? I have a test block for each step and do not understand how to share that value from one test block to another.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source