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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…