https://medium.com/@kritiverma212/tricentis-tosca-how-to-get-current-url-and-save-it-in-buffer-ecfb454a3550
Check out this link I have given step by step process to get current url