
pages.herokuapp.FileUpload Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of AUTOTESTIMATIC-JAVA Show documentation
Show all versions of AUTOTESTIMATIC-JAVA Show documentation
An open-source Selenium Java-based Test automation Framework that allows you to perform multiple actions
to test a web application's functionality, behaviour, which provides easy to use syntax,
and easy to set up environment according to the needed requirements for testing
package pages.herokuapp;
import driverfactory.webdriver.WebDriver;
import org.openqa.selenium.By;
public class FileUpload {
public final WebDriver driver;
By chooseFileButton = By.id("file-upload");
By uploadFileButton = By.id("file-submit");
By successMessage = By.cssSelector("h3");
public FileUpload(WebDriver driver){
this.driver = driver;
}
public FileUpload uploadingFile(){
driver.element().fillField(chooseFileButton,"C:\\Users\\moham\\Downloads\\Cover_Letter.docx");
return this;
}
public FileUpload clickOnSubmitButton(){
driver.element().click(uploadFileButton);
return this;
}
public FileUpload checkThatFileShouldBeUploaded(){
driver.assertThat().element(successMessage).text().isEqualTo("File Uploaded!");
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy