What is RasterFormatException in Java?

0 votes
I am writing a selenium code in Java to get a partial screenshot of just the element and am getting this error:-

Exception in thread "main" java.awt.image.RasterFormatException: (y + height) is outside of Raster

Can someone help me with what it is and how to handle it?

Thank you in advance.
Dec 31, 2018 in Selenium by Sradha
• 1,710 points
104 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

RasterFormatException is thrown by getSubImage() when the area specified by [ x,y : x+width, y+height] is not contained within the BufferedImage area.

For more details on RasterFormatException you can see this documentation.

answered Dec 31, 2018 by rishav raj

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer

What is the role of TestNG & JUnit frameworks in Selenium?

Well TestNG and JUnit are test frameworks ...READ MORE

answered Apr 18, 2018 in Selenium by king_kenny
• 3,590 points
124 views
0 votes
1 answer

What is the difference between dot and text() in XPath?

Even though there is some difference between ...READ MORE

answered Apr 25, 2018 in Selenium by king_kenny
• 3,590 points
721 views
0 votes
1 answer

what is the need of xpath when you have attributes like id ,class,name in selenium?

It is not necessary that every element ...READ MORE

answered Jun 1, 2018 in Selenium by Vinita
• 220 points
48 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,030 points
56 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
420 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
43 views
0 votes
1 answer

What is Validation in Selenium?

Validation in selenium means checking wether all ...READ MORE

answered Dec 24, 2018 in Selenium by Nabarupa
64 views
0 votes
1 answer

What is TestNG and why it is used in selenium?

Hello @User, Talking about TestNG, it is an ...READ MORE

answered Dec 24, 2018 in Selenium by Shuvodip
49 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.