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
130 views

1 answer to this question.

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
193 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
960 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
95 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,050 points
281 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
644 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
271 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
217 views