driver = webdriver.PhantomJS(desired_capabilities=dcap, service_args=[
    '--ignore-ssl-errors=true', '--ssl-protocol=any', '--web-security=false'])
driver.set_window_size(1024, 768)
driver.get('http://www.httpbin.org')
time.sleep(2)
driver.execute_script(
    'document.getElementsByClassName("mp")[0].style.background = "green"')
driver.save_screenshot('testing1.png')
driver.get('http://www.kahoot.it')
time.sleep(2)
driver.execute_script(
    "var body = document.getElementsByTagName('body')[0]; body.setAttribute('background-color', 'white')"
    )
driver.execute_script('document.body.style.background = "black"')
driver.save_screenshot('testing2.png')
Transparent screenshot with PhantomJS in Selenium [Python]?