For my homework assignment, I am working on a basic web automation project using JavaScript and selenium. The goal is to click on a link and fill out a form on the following page. However, I am facing an issue where even though I can locate the web element correctly, I am unable to fill in the form.
I have attempted to use both Xpath and CSS selectors to identify the web element.
const driver = new selenium.Builder().forBrowser("chrome").build();
const form = driver.findElement(By.linkText("Form Authentication")).click;
const username = driver.findElement(By.xpath("//form/div/div/input[@id = "username"]")).sendKeys("some text");
driver.get(url);
The expected outcome should be that the Username/password fields are filled with some text. However, despite no errors being displayed, no action is taken.