Answer the question
In order to leave comments, you need to log in
Selenium+Python. How to get an image without saving to disk?
Dear! Is there a way to get the image without saving it to disk?
I did not find an answer on the Internet.
This code saves via screenshot:
driver.find_element_by_css_selector('.class_name').screenshot('image.png')
Answer the question
In order to leave comments, you need to log in
Something like this:
screenshot = driver.find_element_by_css_selector('class_name').screenshot_as_png
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question