So I start with a login URL say ("https://LOGIN-URL.com"), I send key values of login credentials with the send keys method, after a few seconds, the credentials are validated and new URL loads ("https://HOME-PAGE.com") with the home page, where I will have to perform some action and then click a button to move onto the next page with a different URL like ("https://transactions-tester123.com")
how do i achecve this with Java Selenium UI automation?
Below i have attached code where i am able to get till the login credentials part, but unable to perform actions in the new URL
driver.get("https://LOGIN-URL.com");
driver.manage().window().maximize();
System.out.println(" User trying to login");
driver.findElement(By.xpath("//input[@id='username']")).sendKeys("hello");
driver.findElement(By.xpath("//input[@id='password']")).sendKeys("password");
driver.findElement(By.xpath("//span[@id='ui-id-44']")).click();
System.out.println("Login successful");
System.out.println("Now user in Home Page");