package com.automation.tests; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import utility.Helper; public class CaptureScreenShotDemo { WebDriver driver; @Test public void facebookLogin(){ driver.findElement(By.id("email")).sendKeys("9856451461"); driver.findElement(By.id("pass")).sendKeys("qwerty123"); driver.findElement(By.id("loginbutton")).click(); } @AfterTest public void afterScreenshot() { Helper.captureScreenShort(driver, "facebook"); driver.close(); } @BeforeTest public void beforeScreenshot(){ driver = Helper.launchBrowser("chrome"); driver.get("http://facebook.com"); } }
Automation Testing
▼
Selenium IDE
▼
Selenium WebDriver
▼
Selenium Grid
▼
No comments:
Post a Comment