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
461 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 in Selenium by Sri
• 2,970 points
886 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
3,793 views
0 votes
2 answers
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
3,774 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

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

answered Aug 31 in Selenium by Sri
• 2,970 points
4,758 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
2,735 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 in Selenium by Sri
• 2,970 points
3,098 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
2,850 views