Common methods for the basic elements of Selenium scripts
Basic elements of the page:
1. Method of uploading pictures
Private static void fileUpload (WebDriver driver, String s, String filepath) {
WebElement file = driver.findElement (By.name (s))
File.sendKeys (filepath)
}
Call:
FileUpload (driver, "file", "C:\ pictures\\ pic1.jpg")