how can i get the full URL of a href attribute?

<a id="next" href="/housing/__1_0_0_0_1_0_0/">next page</a>

when I put the mouse over href value, there will be a a link with a full url ""

how can I get the full url instead of the relative url?

I used xpath("//a/@href"),but it only gets the relative url "/housing/__1_0_0_0_1_0_0/"

Any help would be appreciated!

window.location can give you everything you want to know about the current browser location, which you could use to compose a fully qualified URL.