Dealing with the library selenium is really becoming exhausting. If you need to inject JavaScript code into Selenium, try this:
`js = "Enter your JS code here"
driver.excute_script(js)`
However, my JavaScript code contains multiple lines, like this:
setTimeout(function(){l = document.getElementsByClassName("test-option");for(const a in l){if(l[a]==undefined || l[a]==null)continue;if(l[a].innerText !=undefined && l[a].innerText.includes("Miracle")){l[a].click();}}, 2000);
When I remove the newline characters and concatenate the lines using single or double quotes, Selenium starts behaving unpredictably. Is there a more effective way to pass JavaScript strings to Selenium? Thank you.