A lot of the time our Selenium remote control browsers will be running on different machines than the machine that starts the tests. This is because you, as a developer or tester, need a mechanism to have a screenshot of what the error looks like when the test failed. Images that are captured are saved in PNG format.
Unfortunately capturing screenshots in Selenium is limited to real browsers such as Mozilla Firefox, Google Chrome, and Internet Explorer. This is because these browsers have libraries that Selenium can use to take screenshots. As more libraries are added to Selenium for different browsers, you will be able to take more screenshots. They will use the same API call so there will be no need to change your tests.
Screenshots capability lives within an interface called TakesScreenshot. We will cast the driver to this and then use the interface to access getScreenshotAs() method. You will also need to import the following library:
import static openqa.selenium.OutputType.*;
Capturing base64 version of images
In this section we are going to have a look at capturing a base64 representation of an image. Base64 is a group of encoding schemes that allow us to represent binary data as ASCII. A common use for them in web applications is to place data URLs as the source for images to save on downloads that the browser has to do when it is parsing the HTML.
Selenium Related Interview Questions
|SILK TEST Interview Questions||QTP Interview Questions|
|JMeter Interview Questions||Automation Testing Interview Questions|
|Software testing Interview Questions||JUnit Interview Questions|
|TestNG Interview Questions||SAP Testing Interview Questions|
|Selenium WebDriver Interview Questions||Selenium IDE Interview Questions|
|QUnit Testing Interview Questions||Performance Testing Interview Questions|
|Hadoop Testing Interview Questions|
Getting Started With Selenium Ide
Overview Of Selenium Webdriver
Working With Webdriver
Getting Started With Selenium Grid
Advanced User Interactions
Working With Html5
Migrating From Remote Control To Webdriver
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.