Currently, I am working on writing Cucumber tests for my project. One issue I have encountered is that when clicking a certain button in my code, it redirects to another page with a fixed URL. How can I retrieve the current URL within the Cucumber test? I attempted to achieve this as follows:
if (driver.getCurrentUrl() === http://localhost:8080/testURL){
console.log("some output");
}
Unfortunately, this approach did not yield the desired results.
I would greatly appreciate any assistance or insights into solving this problem. Thank you!