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,750 points
650 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
2 answers

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

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

answered Sep 4, 2020 in Selenium by Sri
• 3,010 points
1,126 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,710 points
4,818 views
0 votes
2 answers

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

some of the controls not have id ...READ MORE

answered Sep 4, 2020 in Selenium by Sri
• 3,010 points
776 views
0 votes
2 answers

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,520 points
5,053 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,010 points
5,800 views
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,890 points
3,564 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2, 2020 in Selenium by Sri
• 3,010 points
4,296 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
3,454 views