java - Selenium Webdriver - Capture URL in screenshot using Robot -
robot robot = new robot(); bufferedimage screenshot = robot.createscreencapture(new rectangle(toolkit.getdefaulttoolkit().getscreensize())); imageio.write(screenshot, "jpg", new file("screenshot.jpg"));
this code capture screenshot of whatever present on desktop screen when test cases fail. need take screenshot of chromedriver browser screen url. how can capture error scenario in selenium?
chrome driver appears issue fullsize screenshots. can see people have written work around here
or can reference screenshot here
Comments
Post a Comment