I´ve been creating a automatic Instagram Login for the past few days now but now I have encountered my probably biggest problem. Whenever I try to click on the "Not now" Button automatically for Remembering my Password on Instagram, which it does , Safari Crashes completely, not only the automatically processed tabs even the ones no Program is using. This is the code I use to press the "Not now" Button:
new WebDriverWait(driver, Duration.ofSeconds(10));
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));
WebElement Nichtjetzt = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//button[text()='Not Now']")));
WebElement Notnow = driver.findElement(By.xpath("//button[text()='Not Now']"));
((JavascriptExecutor)driver).executeScript("arguments[0].click();",Notnow);
When I now try to execute the Method it will press only essential cookies fill out my username and password and press the login button , but then when it gets to the Press Not now button it will press it and immediately crash. This will then be the Error Code: