How to take screenshots and paste it in a word file one by one using webDriver (java)
问题 I am able to take screenshot by ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE); In my application I have to take screenshot for every page so I want to save the multiple screenshot into a single .doc file one by one. Is there any API? Any Idea? Please Help... 回答1: Easiest way - take screenshot, put it in PNG/JPEG file, read it, add it in MS-Word, delete the file, simple. here's a ready to use code for you.... BINGO...!! import java.awt.Rectangle; import java.awt.Robot; import java