Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Selenium opening pdf in new window
#6
Here i found the following code:
page_src = br.page_source.encode("utf-8") // support unicode characters
f = open('page.html', 'w')
f.write(page_src)
but the encoding seems to be different from that needed for a pdf file. I'm getting a 'file type not supported' error on trying to see the downloaded file.
I think i'm doing something wrong...downloading a file shouldn't be so difficult..
Any help, welcome
Reply


Messages In This Thread
Selenium opening pdf in new window - by test - Sep-13-2018, 06:53 AM
RE: Selenium opening pdf in new window - by Larz60+ - Sep-13-2018, 10:23 AM
RE: Selenium opening pdf in new window - by test - Sep-13-2018, 02:08 PM
RE: Selenium opening pdf in new window - by test - Sep-14-2018, 06:54 PM
RE: Selenium opening pdf in new window - by test - Sep-15-2018, 02:14 AM
RE: Selenium opening pdf in new window - by test - Sep-15-2018, 06:17 AM
RE: Selenium opening pdf in new window - by test - Sep-15-2018, 07:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Selenium Window Not Closing gw1500se 4 2,927 May-02-2022, 02:23 PM
Last Post: gw1500se
  Web Page not opening while web scraping through python selenium sumandas89 4 10,356 Nov-19-2018, 02:47 PM
Last Post: snippsat
  Getting error when accessing elements in a modal window of an webpage using selenium sumandas89 3 8,921 Jul-13-2018, 10:44 AM
Last Post: mlieqo
  How to access Modal window using Selenium Python sumandas89 0 4,378 Mar-30-2018, 08:21 AM
Last Post: sumandas89
  Need Help Opening A New Tab in Selenium HiImNew 2 39,906 Jan-15-2018, 05:53 AM
Last Post: HiImNew
  Error in Selenium: CRITICAL:root:Selenium module is not installed...Exiting program. AcszE 1 3,822 Nov-03-2017, 08:41 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020