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

Popular posts from this blog

vue.js - Create hooks for automated testing -

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

serial port - hub4com OVERRUN Error -