2

I have tried to download the image using Context click method and Image is getting selected but unable to download the image ? Please find below code for reference.

    WebElement we = driver.findElement(By.xpath("//img[contains(@src,'41thskyt96l_1_1-e18b7.jpg')]"));
    Actions action = new Actions(driver);
    action.contextClick(we).build().perform();
    action.sendKeys(Keys.CONTROL, "v").build().perform();

Please let me know what changes need to be done to download a image ?

Mohsin Awan
  • 1,176
  • 2
  • 12
  • 29
Raghu
  • 31
  • 1
  • 1
  • 2
  • What error you are getting? – RNS Jul 19 '17 at 05:01
  • test is passed but I see following message and I'm using firefox browser v52.0.2 (32bit) [Child 4264] ###!!! ABORT: Aborting on channel error.: file c:/builds/moz2_slave/m-rel-w32 00000000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2143 Jul 19, 2017 10:44:44 AM org.openqa.selenium.os.UnixProcess destroy – Raghu Jul 19 '17 at 05:16
  • possible duplicate of https://stackoverflow.com/questions/17361742/download-image-with-selenium-python – Nicolas G. Duvivier Jul 19 '17 at 09:17
  • @NicolasG.Duvivier https://stackoverflow.com/questions/17361742/download-image-with-selenium-python post has different scenario compare with my post. Thanks ! – Raghu Jul 19 '17 at 10:19

0 Answers0