When I take a screenshot using Selenium Firefox Webdriver (yes, Firefox has flash plugin) it doesn't show the flash object. It shows merely a white box instead. Is there something I must do / install?
I'm using this code:
from selenium import webdriver
def webshot(url, filename):
browser = webdriver.Firefox()
browser.get(url)
browser.save_screenshot(filename)
browser.quit()
In order to get this working, I had to use the wmode=transparent attribute. But obviously, this will depend on whether you can edit the source of the webpage you're trying to screenshot.
To edit an existing HTML page, add the WMODE parameters to the HTML code.
Add the following parameter to the OBJECT tag:
<param name="wmode" value="transparent">
Cheers, ns
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With