This really shouldn't be in a page object as it's not related to the pages at all. I would prefer to see this in a base test class or helper class.