I need to have these characters in my string: "'\;
userID = "__\"__\'__\;__"
I am running javascript through python to update the username field:
driver.execute_script("window.document.getElementById('username').value = '%s';" %userID)
Now my problem is that in the end my script becomes:
window.document.getElementById('username').value = '__"__'__\;__';
And this causes errors since I have single quote without escape character. How can I keep the escape character in front of the single quote?