//*[text()[contains(.,"Utility Top Up")]]
use wait :
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//*[text()[contains(.,"Utility Top Up")]]")));
The text is inside anchor tag but there is a tag in between text so , first get text contents using text() and check for utility Top in all the ...
You have twice the same selector: By.xpath("//div[@id='wrapper']/div/ul/li/a")
Are you sure the second time the selector is exact the same? In my experience new elements that are created after a click have a different selector.
I would try a more simple selector like: By.partialLinkText("Utility Top Up")
If you want a better answer I ...
As illustrated in All You Need To Know About UI Testing, Selenium is the best way to go for automated UI testing. A great learning curve helps you run the Selenium tests quickly and easily. To have hassle-free testing, you can use an online cross-browser testing platform that integrates with Selenium and can provide many features through drag and drop ...