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 4be1e45 commit 8f79049Copy full SHA for 8f79049
examples/image_test.py
@@ -0,0 +1,16 @@
1
+"""
2
+Pull an image from a website and save it as a PNG file.
3
4
+
5
+from seleniumbase import BaseCase
6
7
8
+class ImageTest(BaseCase):
9
10
+ def test_pull_image_from_website(self):
11
+ self.open("https://xkcd.com/1117/")
12
+ selector = "#comic"
13
+ file_name = "comic.png"
14
+ folder = "images_exported"
15
+ self.save_element_as_image_file(selector, file_name, folder)
16
+ print('"%s/%s" has been saved!' % (folder, file_name))
0 commit comments