java - How to take screenshot while popping the error message using Selenium -
i'm new selenium. need know how take screenshot while popping error message. i've browsed in web , used below codes not satisfying requirements
file src=screenshot.getscreenshotas(outputtype.file); fileutils.copyfile(src, new file("d:\\"+result.getname()+".png"));
the above code not capturing pop-up msg. capturing behind screen only.
bufferedimage image = new robot().createscreencapture(new rectangle(tk.getscreensize())); imageio.write(image, "jpg", new file("d:\\"+formatter.format(now.gettime())+".jpg"));
robo screenshot not working when switched other screen. when error occurs capturing present screen.
someone please give me code snippet?
wiki
Comments
Post a Comment