Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62aa4b7 commit f2e1fa2Copy full SHA for f2e1fa2
source/faq.rst
@@ -113,3 +113,15 @@ First download the Firebug XPI file, later you call the
113
fp.set_preference("extensions.firebug.currentVersion", "1.8.4") #Avoid startup screen
114
browser = webdriver.Firefox(firefox_profile=fp)
115
116
+How to take screenshot of the current window ?
117
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
118
+
119
+Use the `save_screenshot` method provided by the webdriver::
120
121
+ from selenium import webdriver
122
123
+ driver = webdriver.Firefox()
124
+ driver.get('http://www.python.org/')
125
+ driver.save_screenshot('screenshot.png')
126
+ driver.quit()
127
0 commit comments