Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scrolling problem with IE and Safari "webdriver -Ashot" #77

Closed
seekingKnowledge opened this issue Jul 15, 2016 · 0 comments
Closed

scrolling problem with IE and Safari "webdriver -Ashot" #77

seekingKnowledge opened this issue Jul 15, 2016 · 0 comments

Comments

@seekingKnowledge
Copy link

public class IndiaTimes {
public static void main(String[] args) throws IOException, InterruptedException {
WebDriver wd = new SafariDriver();
wd.get("http://www.indiatimes.com");
Thread.sleep(5000);
((JavascriptExecutor) wd).executeScript("$('#wrap header').hide();");
Thread.sleep(500);
WebElement we = wd.findElement(By.cssSelector("#hp_block_2"));
final Screenshot screenshot = new AShot()
.shootingStrategy(new ViewportPastingStrategy(1500))
.takeScreenshot(wd, we);
final BufferedImage image = screenshot.getImage();
ImageIO.write(image, "PNG",
new File(System.getProperty("user.home") + "/AShot_indiatimes.png"));
}
}

@abhishekkyd @pazone @frolovs I am using the code that you are suggesting that it will work for safari, but it is not working for me on safari... I have attached the screenshot I obtained using the code above... please provide any configuration i need for Safari and IE.
I am new sorry if i ask some silly question or use inappropriate words...
thank you
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants