hi, is it possible to save a webpage using webdriver?
--To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/UEmhDCAbE3oJ.
You received this message because you are subscribed to the Google Groups "webdriver" group.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.
Hi,You want to take screen shot of a page or want to take view source.Can you please give more details of your requirement.ThanksStarter
On Tue, Apr 24, 2012 at 6:48 PM, Rasanga <rasan...@gmail.com> wrote:
hi, is it possible to save a webpage using webdriver? --To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/UEmhDCAbE3oJ.
You received this message because you are subscribed to the Google Groups "webdriver" group.
To unsubscribe from this group, send email to webdriver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/EO57i579VIYJ.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
I’ll replicate my post from this thread:
https://groups.google.com/d/topic/selenium-users/X6OmbPRPY94/discussion
This all depends upon how much detail you need to go into.
If you just want to check based on filename all you need to do is parse the src attribute of your link. If you want to physically load up the PDF and check it you'll need to use some external libraries and the process is not straight forward.
Before going down this path ask yourself what the benefit is.
· Is the PDF likely to have an incorrect filename?
· If you load the PDF up how much actual checking are you going to do?
· Would it be enough to just know the filename and filesize?
· Could you download it and do an MD5/SHA1 hash to determine it’s the correct file without loading it up and checking the content?
If you are determined to do more than check the filename you will first of all need to download the PDF using something like my Downloader Class. You can then check filesize and/or perform an MD5/SHA1 hash to confirm that it is the file you expect.
If you want to go further and load the PDF up and validate parts of its content you will then need to write a PDF handler, a quick google brings up http://pdfbox.apache.org/ which looks like it will probably meet your requirements.
This is all very Java orientated (because I use Java). The principle will be the same for other languages.
Selenium is not able to read a PDF file because it is actually using adobe reader to show the PDF, it is not rendered HTML.
From: webd...@googlegroups.com [mailto:webd...@googlegroups.com] On Behalf Of Rasanga
Sent: 25 April 2012 09:57
To: webd...@googlegroups.com
Subject: Re: [webdriver] Is it possible to save a web page using webdriver?
i need to extract some text from an in-line pdf, how ever my PDF reader seems to be failing when i try to read it from the browser, so i was hoping to save the page first and then read it.
Regards
Rasanga
On Wednesday, April 25, 2012 8:17:33 AM UTC+1, Selenium User wrote:
Hi,
You want to take screen shot of a page or want to take view source.
Can you please give more details of your requirement.
Thanks
Starter
On Tue, Apr 24, 2012 at 6:48 PM, Rasanga <rasan...@gmail.com> wrote:
hi, is it possible to save a webpage using webdriver?
--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/UEmhDCAbE3oJ.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.
--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/EO57i579VIYJ.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
Hi,You want to take screen shot of a page or want to take view source.Can you please give more details of your requirement.ThanksStarter
On Tue, Apr 24, 2012 at 6:48 PM, Rasanga <rasan...@gmail.com> wrote:
hi, is it possible to save a webpage using webdriver? --To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/UEmhDCAbE3oJ.
You received this message because you are subscribed to the Google Groups "webdriver" group.
To unsubscribe from this group, send email to webdriver+unsubscribe@googlegroups.com.