This test class uses Selenium WebDriver with Java and JUnit 5.
setUp() method initializes the ChromeDriver and opens the login page URL.
Two test methods verify the login button presence:
testLoginButtonUsingXPath() locates the button by XPath //button[@id='loginBtn'] and waits until it is visible, then asserts it is displayed.testLoginButtonUsingCssSelector() locates the same button by CSS selector button#loginBtn with explicit wait and asserts visibility.
Explicit waits ensure the test waits for the element to appear instead of failing immediately.
tearDown() closes the browser after each test.
This approach shows how to choose between XPath and CSS selectors for locating elements, emphasizing best practices like explicit waits and clear assertions.