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

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -