Passing variables through Selenium send.keys instead of strings
I think username might be a variable in the python library you are using. Try calling it something else like Username1 and see if it works??
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.