I am trying to do some testing in a headless browser, to test filling in a form.
I am using code that I was shown from the following example :
github link to example of using phantomjs
My code :
WebDriverWait wait = new WebDriverWait(driver, 30);
driver.get("<URL HERE, left out for privacy on stack overflow!>");
By amount = By.id("amountField");
wait.until(ExpectedConditions.presenceOfElementLocated(amount));
Error in intelliJ :
until(java.util.function<? super org.openqa.selenium.WebDriver, V) in FluentWait cannot be applied to :
(org.openqa.selenium.support.ui.ExpectedCondition<org.openqa.selenium.WebElement>)
I am not really sure where I am going wrong here - but I have spent two hours trying to fix this issue.
element I am looking for on page :
<input name="amount0" id="amountField" value="" class="amount form-control" type="number" pattern="\d+(\.\d*)?" maxlength="10" placeholder="Amount">