I need to change part of URL every 5 seconds and refresh the browser tab with a new URL
URL: looks like
https://tes.test/tes/test#12.4/40.0000/-0.0/24.934764/55.158747/22981.332850
And I want to change for example /40.000/ every 5 seconds by adding 5k (40.000+5.000=new URL with 45.000 every 5 seconds.
I have doubt that this can be done with windows.location but I have no idea how to implement this.
For now, I have
cy.get('canvas').click()
for (let i = 0; i < 10; i++){
let url = window.location.href
const refreshData = url.split("/")[5]
url = url.replace(refreshData, `${+refreshData + 5}`)
console.log(url)
cy.visit(url)
cy.wait(1000)
but this is not updating URL in Cypress browser tab