public static void Knorr(String maill) throws InterruptedException { WebDriver firefox = new FirefoxDriver(); firefox.get("https://marketing.tr.netsalesmedia.pl/ts/i5036350/tsc?amc=dis.cubegroup.389902.403207.146737&tst=!!TIMESTAMP!!"); Thread.sleep(6000); firefox.findElement(By.cssSelector(".button-right")).click(); Thread.sleep(2000); firefox.findElement(By.cssSelector("div.agree-row:nth-child(5) > div:nth-child(1) > input:nth-child(1)")).click(); firefox.findElement(By.cssSelector("div.agree-row:nth-child(6) > div:nth-child(1) > input:nth-child(1)")).click(); firefox.findElement(By.cssSelector("div.agree-row:nth-child(7) > div:nth-child(1) > input:nth-child(1)")).click(); firefox.findElement(By.cssSelector("div.agree-row:nth-child(8) > div:nth-child(1) > input:nth-child(1)")).click(); Thread.sleep(1000); firefox.findElement(By.xpath("/html/body/div[2]/div[2]/div/div/div/div[2]/div/div[3]/div/div/div/div/div[2]/div[8]/input")).sendKeys(maill); //W TEJ LINIJCE WYWALA BŁĄD Thread.sleep(3000); firefox.findElement(By.cssSelector(".download-ebook-button")).click(); Thread.sleep(6000); firefox.close(); }