public class NavigationHelper {
// Overloaded method without timeout:
public static void navigateTo(String path) {
navigateTo(path, 30000);
}// Overloaded method with custom timeout:
public static void navigateTo(String path, int timeoutMs) {
System.out.println("Navigating to " + path + " with timeout " + timeoutMs);
}
}
public: Accessible anywhere in the test framework.
- protected: Accessible within package and subclasses.
- private: Encapsulated inside the page or helper class.
- default (package-private): Accessible inside the same package.