Before I begin, I've tried...
Selenium HtmlUnitDriver clicking on checkbox
None of these work for me...
I have narrowed down my issue to the username.sendKeys("hullo"); line
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
public class WebAccessor {
public static void main(String[] args) {
WebDriver driver = new HtmlUnitDriver();
driver.get("https://portal.mcpsmd.org/public/");
// Find the text input element by its name
WebElement username = driver.findElement(By.id("fieldAccount"));
WebElement password = driver.findElement(By.id("fieldPassword"));
// Enter something to search for
username.sendKeys("hullo");
// WebElement submit = driver.findElement(By.name("btn-enter"));
// Check the title of the page
System.out.println("Page title is: " + driver.getTitle());
driver.quit();
}
}
Now, unfortunately, nothing i have tried allows me to fix the "you may only interact with visible elements" error and, from what I have seen, this field is QUITE visible, it is labeled correctly from what an hour of digging in the inspect element field.
Many thanks in advance.