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,760 points
2,576 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,190 points
2,848 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
8,275 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,190 points
1,771 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,500 points
13,578 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,190 points
9,090 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,910 points
7,182 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 3, 2020 in Selenium by Sri
• 3,190 points
7,843 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
6,777 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP