Replace call to "navigate.to" with script