I have grasped the concept somewhat from the instance of "Watching for 'alerts'" on this website: HtmlUnit- Javascript Tutorial. Being new to .NET, the functionality of Collections.singletonList is unclear to me, and after some research, I discovered it is a Java function. I am attempting to incorporate this into validation where an alert box appears when a user enters invalid input. So far, I have written the following code as a starting point:
Dim alert As AlertHandler
webCLient.setAlertHandler(alert)
webCLient.getAlertHandler().handleAlert(page, "")