How to check if a text if found in Current URL

.then(function () {
return $browser
.getCurrentUrl()
.then(function (currentUrl) {
//Example currentUrl type 1: WWW.example.com/SuperCategory?parameters
//Parameters can change. So i cant compare it with static URL. Need to know if i can check if currentURL contains supercategory text in it
});
})

Hi, @Chiddarthan.Dhavidan: https://www.w3schools.com/jsref/jsref_includes.asp

That Worked. Thank you.

1 Like