I have a CSV file with IPs and passwords for cameras. I made a script to go into the website and configure some settings. but the problem is some of these IPs are not working so the page will return 404 not found.
I want to detect these and ignore them, because every time I face a broken page, the for loop stops.
this a portion of my code:
String PathofPage = "http://"+p1+"/doc/page/config.asp";
driver.get(PathofPage);
driver.manage().window().maximize();
if( driver.getTitle()=="HTTP 404 Not Found")
driver.quit();
WebElement Username = driver.findElement(By.id("username"));
Username.click();
It's not exiting the browser when it finds the title.
This is an example of it's not finding the website