Share
Go down
Love Sharma
Regular Participant
Regular Participant
Posts : 27
Join date : 2012-06-01

Save-As Dialog Box in FireFox

on Fri Jun 01, 2012 9:26 am
Hi,
I am facing some
issue with FireFox dialog box and would need your help.





My Work: Using Selenium
Webdriver, I want to “Save –As” an image on my desktop from a web page



My Expectation: I want to “Save
–As” an image on my desktop from a web page using firefox browser.



Issue I am facing: I triggered the
dialog box of “Save – As” using
contextClick but after that unable to do
anything and save the file






Pls see below
my code details and advise me. I really would be happy to get a response from
your side.






public static void main(String[] args) throws
InterruptedException



{



FirefoxProfile profile = new FirefoxProfile(new
File("path"));




WebDriver driver = new FirefoxDriver(profile);




driver.get("my vpn relevant website");




Thread.sleep(2000);




WebElement img = driver.findElement(By.xpath("/html/body/div/div[4]/div/div/div/div/div/div/div/a[2]/img"));






Actions
imghover = new Actions(driver);




imghover.contextClick(img).sendKeys("V");//
After this
“Save –As” dialog box opens but unable o do anything further. Want to save the
file on desktop
avatar
rohit13
Master
Master
Posts : 180
Join date : 2012-03-29
Age : 31
Location : INDIA
http://radical-qa.blogspot.in/

Re: Save-As Dialog Box in FireFox

on Fri Jun 01, 2012 12:34 pm

_________________
Radical QA
http://radical-qa.blogspot.in/
Love Sharma
Regular Participant
Regular Participant
Posts : 27
Join date : 2012-06-01

Re: Save-As Dialog Box in FireFox

on Fri Jun 01, 2012 6:55 pm
Thanks Rohit,

I saw the posts and some other on google. But can we do it on FireFox without AutoIton please?
avatar
rohit13
Master
Master
Posts : 180
Join date : 2012-03-29
Age : 31
Location : INDIA
http://radical-qa.blogspot.in/

Re: Save-As Dialog Box in FireFox

on Fri Jun 01, 2012 7:34 pm
We can not automate system generated pop-up by selenium.
So for this you have to go with autoit, which will record your click operation (co-ordinate)

_________________
Radical QA
http://radical-qa.blogspot.in/
Sponsored content

Re: Save-As Dialog Box in FireFox

Back to top
Permissions in this forum:
You cannot reply to topics in this forum