I am fixing this issue following insecure tips. I took screenshots of external pages, so I had to change wmode to transparent at runtime. So I needed to change all EMBED and OBJECT using javascript. I found this nice script: http://www.onlineaspect.com/2009/08/13/javascript_to_fix_wmode_parameters/
So I just made a script to execute it and uploaded it to "mysite.com/myscript.js", and now the working script is here:
from selenium import webdriver script = ''' var s = document.createElement('script'); s.src = 'http://mysite.com/myscript.js'; document.body.appendChild(s); ''' def webshot(url, filename): browser = webdriver.Firefox() browser.get(url) browser.execute_script(script) browser.save_screenshot(filename) browser.quit()
As far as I can tell from javascript validation, it should work for almost any flash drive. I tested only a few tests, but at least I can make sure that it works when screening YouTube pages with video playback.
Cruel source share