У нас вы можете посмотреть бесплатно Selenium Tutorial series | Sinhala | PART19-Different ways to Take Screenshot |TakesScreenshot|Robot или скачать в максимальном доступном качестве, которое было загружено на ютуб. Для скачивания выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса savevideohd.ru
Taking screenshot is one of the very important things in selenium automation. Screenshot gives us a better understanding of where the issue has happened. Suppose if we are doing headless testing then screenshots are the only way of identifying the issue with related to UI. There are two ways where we can take a screenshot. One is TakesScreenShot Interface provided by Selenium itself. The problem with this built-in option is, it can take the snap on only a particular portion but not the entire screen. If there are any alerts present on the screen and if we want to take the screenshot then, TakesScreenshot is not suitable. We can use the Robot class's createScreenCapture method to capture the full-screen screenshot. Steps to take Screenshot using TakesScreenshot interface: ---------------------------------------------------------------------------------------------- 1. Using Selenium's TakesScreenshot 2. call GetScreenshotAs method and store it in a file 3. Create an image file in any location 4. copy the screenshot in destinationFile (image) file, using FileUtils.(commons-io) or we can use Selenium's FileHandler as well to copy the file. Steps to take Screenshot using Robot class: ----------------------------------------------------------------------- 1) Create an object of Robot class. 2) Get the screen size and store. 3) Use the Rectangle class and pass the screen size. 4) Use createScreenCapture(rectangle) of Robot class and capture screenshot. (source) 5) Define destination path file for the screenshot. 6) Write temp file into the destination file. (ImageIO) 𝐓𝐡𝐞 𝐛𝐞𝐥𝐨𝐰 𝐰𝐞𝐛𝐬𝐢𝐭𝐞 𝐢𝐬 𝐮𝐬𝐞𝐝 𝐟𝐨𝐫 𝐩𝐫𝐚𝐜𝐭𝐢𝐜𝐞: 👇 ✅ https://www.leafground.com/alert.xhtml Topics Covered ------------------------- 1) capture Screenshot of Full web page 2) capture Screenshot of Section of a Web Page 3) capture Screenshot of an Element on a Web Page 4) capture Screenshot of Full entire screen Support by donating: --------------------------------- Best way to reach me (replies will be faster): YouTube comment section 👤 Name : Hashir Hasmy 📱 LinkedIn : / mohamed-hashir-370840198 📧 Email : [email protected] 🔗 GitHub : https://github.com/hashirhasmy #selenium #Java #TakeScreenshot #Sinhala #HashirHasmy #webAutomation #QualityAssurance