It seems the second page is opening in a new tab, please switch the tab before interacting with the page:
ArrayList<String> tabs = new ArrayList<String>(driver....
Refer to this question:
chrome.window.onRemoved.addListener(), works only when a chrome process is running. The `driver.quit()` closes all the chrome processes.
Could you try this :
// Initializing instance of Firefox WebDriver
driver = new ChromeDriver();
wait = new ...
For of all thank everyone for your help!
The answer was quite simple and I hope some of the senior members dont get mad.
In order to access the elements on the second page all I that needed to be done is switch to the correct tab.
ArrayList<String> tabs2 = new ArrayList<String>(driver.getWindowHandles());