How to get html dynamic value

Let’s be clear about the terminology: “value” is not the same as “text”. With the limited amount of information you have provided, I think you’re looking for the text. If that is so and your xpath is correct, then the text (within the span element) whatever it is, will be returned by getText.

If that is not the case, then you’re not providing enough info. Read this and follow the advice.