Here we will take a screen shot of the Ocean Viewer page. Since it has a welcome alert that we do not want included in the screenshot we closed the welcome alert before taking the screen shot.
#Import Selenium Webdriver from selenium import webdriver #open Fire fox driver = webdriver.Firefox() # Resize the window to the desired screen width/height driver.set_window_size(1300, 800) #Open URL driver.get('http://oceanviewer.org/atlantic-canada/temperature/') # Close welcome screen #To find element id right click on button and hit select inspect element #The name will be in a bubble above the text. #In our case the element id is close welcome screen driver.find_element_by_id("close_welcome").click() #save screenshot driver.save_screenshot('screenshot1.png') #close window driver.quit()
I drop a leave a response when I appreciate a post on a website or I have something to add to the conversation.
It’s a result of the fire displayed in the post I read.
And on this post Take a Screenshot of a web page and “Click” buttons in a web page | Ocean Python.
I was actually moved enough to write a comment 😛 I
do have a couple of questions for you if you do not mind.
Is it simply me or does it look like like a few of the remarks come across like they are left by brain
dead visitors? 😛 And, if you are writing at additional online social sites, I would like to keep up
with anything fresh you have to post. Could you list
every one of all your community sites like your linkedin profile, Facebook page or
twitter feed?
Hi there, thanks for the reply! All of our latest tutorials get posted here. Ocean Viewer does have a twitter page (@OceanViewerOrg) and our facebook page is http://www.facebook.com/OceanViewer.org. As for additional questions feel free to ask in the comments!
How to take the screenshot without open browser
I got this web page from my pal who informed me regarding this site and now this time I am browsing
this website and reading very informative posts here.