Recently, I discovered that JavaScript seems to be malfunctioning in my Selenium Tests written in Java. The reason behind this issue remains a mystery to me. Any ideas on how to tackle this roadblock?
((JavascriptExecutor) driver).executeScript("return arguments[0].innerText", driver.findElement(By.cssSelector("[id$=main:domainsCounter]")));
The good news is that the javascript functions perfectly when executed in the browser's console.