I want to use chrome Plugins like what font, full page Screen capture. in one of my project, can we write the code for it? Using Selenium web-driver + java.
I am still on search, is there any workaround for this?
Need: Take screenshot is works well on firefox, works in chrome also, but it takes image of only visible part not the full page, so I want to use chrome Plugins to make error reporting will be easy.
-
Hey Sameer- can you add some more explanationdemouser123– demouser1232016年01月27日 07:44:47 +00:00Commented Jan 27, 2016 at 7:44
-
@log_file question updated.sameer joshi– sameer joshi2016年01月27日 08:39:47 +00:00Commented Jan 27, 2016 at 8:39
1 Answer 1
A work around I have heard of people doing that wouldn't require any chrome extensions is to resize the window to a large resolution. If the page in question has a set width, then you can resize the window to that, and then make it very long.
import org.openqa.selenium.Dimension;
Dimension screenSize = new Dimension(600, 5000);
webDriver.manage().window().setSize(screenSize);
This won't give you a perfectly sized screenshot that matches the page all the time, and there is a risk that you may still not get the entire page if you're not generous enough. But this could help you act as a temporary solution that doesn't require much work to accomplish.
Explore related questions
See similar questions with these tags.