I want to pass python variable in to javascript. The variable value is an element id and so I want to pass this variable having element id to javascript "getElementById"
I tried -
element = 'id_of_element'
js = """
var element = document.getElementById(""" + element + """)
"""
But I get error - WebDriverException: Message: u'element is null'. Please advise. I am newbee to this.