For a web driver we can execute JavaScript code which includes custom variable like this:
driver.execute_script("alert(\'%s\')" % variable) # an exa