Trying to extract content from the ::after element is proving to be a challenge. Despite my attempts, I keep encountering an exception:
"OpenQA.Selenium.WebDriverException: "javascript error: missing ) after argument list
My setup includes VSC, Selenium WebDriver, and C#. I've attempted to escape quotes without success. Any suggestions on how to resolve this issue? Thank you in advance.
string script = "return window.getComputedStyle(document.querySelector('#bbc-morph-sport-football-header-event-EFBO1065913 abbr[data-reactid *='94.0.1.0'] > span'),':after').getPropertyValue('content')";
IJavaScriptExecutor js = (IJavaScriptExecutor)driver;
string content = (string)js.ExecuteScript(script);