I'm trying to use Selenium for some app testing, and I need it to plug a variable in when filling a form instead of a hardcoded string. IE: 
this works
name_element.send_keys("John Doe")
but this doesnt
name_element.send_keys(username)
Does anyone know how I can accomplish this? Pretty big Python noob, but used Google extensively to try and find out.
Try this.  

username = r'John Doe'

name_element.send_keys(username)

I was able to pass the string without casting it just fine in my test.
Passing variables through Selenium send.keys instead of strings