Refactored test cases to check if browser is enabled before running