Configuring Jenkins and Uploading it in GitHub Repository Using Selenium

Reading Time: 3 mins Taking Screenshots for Failed Test Cases Using Selenium In the below steps, let us see how to take screenshots for the failed test cases using Selenium WebDriver soon after analyzing the Output. Step 1: Replace the webdriver object to TakesScreenshot TakesScreenshot scrShot = ((TakesScreenshot)driver)   Step 2: Call getScreenshotAs to create a file (image) File SrcFile = getScreenshotAs (OutputType.FILE)   Step 3: Copy file to the required location FileUtils.copyFile(scrFile, new File("D:\\screenshot.jpg"))…

Continue Reading