import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.firefox.FirefoxDriver;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
public class className {
public static void main(String[] args) throws InterruptedException {
WebDriver driver;
System.setProperty("webdriver.geckodriver" , "F:\\geckodriver-v0.15.0-win64\\geckodriver.exe");
driver = new FirefoxDriver();
driver.get("<URL>");
driver.findElement(By.id("<first field>")).click();
//This line through the error
WebElement a= driver.findElement(By.id("<id>")).sendKeys("<abc>");
driver.findElement(By.id("<second field>")).click();
driver.findElement(By.id("<field name")).sendKeys("<xyz>");
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
}
}
in this program, the following line throws an error as Type mismatch: cannot convert from void to WebElement.
New to automation. Help is greatly needed