Open vfedirko5 opened 2 weeks ago
@vfedirko5, thank you for creating this issue. We will troubleshoot it as soon as we can.
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template
label.
If the issue is a question, add the I-question
label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted
label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-*
label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer
label.
Thank you!
Can you share the code in a GitHub repository? It is almost impossible to understand from the text above.
We need more information about this issue in order to troubleshoot.
Please turn on logging and re-run your code. Information on how to adjust logs for your language can be found in our Troubleshooting documentation.
Hello guys, Sorry for the delayed answer.
Not able to upload the project to GitHub or decompose it partially.
Here are the logs collected with the FINE level
Thank you! selenium4_issue_fine_logs.txt
This is the relevant piece of the logs.
2024-06-13 12:22:02 FINE Selenium [JdkHttpClient execute0] Executing request: (POST) /session/3fd7d691d31f2919380e65be4a30fa04/execute/sync
2024-06-13 12:22:02 FINE Selenium [JdkHttpClient execute0] Ending request (POST) /session/3fd7d691d31f2919380e65be4a30fa04/execute/sync in 7ms
2024-06-13 12:22:02 FINE Selenium [RemoteWebDriver] Executed: getElementAttribute (Response: SessionID: 3fd7d691d31f2919380e65be4a30fa04, State: success, Value: 1)
2024-06-13 12:22:02 FINE Selenium [RemoteWebDriver] Executing: actions [3fd7d691d31f2919380e65be4a30fa04, actions {actions=[org.openqa.selenium.interactions.Sequence@103d64a0]}]
2024-06-13 12:22:02 FINE Selenium [RemoteWebDriver] Executing: isElementDisplayed [3fd7d691d31f2919380e65be4a30fa04, isElementDisplayed {id=f.487D23111CBCA7F3286EE20258AD1BC7.d.180290C9CD5D9BD5A961B94746A931E4.e.111}]
2024-06-13 12:22:02 FINE Selenium [JdkHttpClient execute0] Executing request: (POST) /session/3fd7d691d31f2919380e65be4a30fa04/execute/sync
2024-06-13 12:22:02 FINE Selenium [JdkHttpClient execute0] Ending request (POST) /session/3fd7d691d31f2919380e65be4a30fa04/execute/sync in 9ms
2024-06-13 12:22:02 FINE Selenium [RemoteWebDriver] Executed: isElementDisplayed (Response: SessionID: 3fd7d691d31f2919380e65be4a30fa04, State: success, Value: true)
2024-06-13 12:22:02 FINE Selenium [RemoteWebDriver] Exception: actions java.lang.reflect.InvocationTargetException
Build info: version: '4.21.0', revision: '79ed462ef4'
It's weird to me that the log indicates that it isn't waiting after executing the actions before sending the isElementDisplayed... We can't actually get some of the interesting pieces from Java because of how it serializes things. Can you turn on driver logging: https://www.selenium.dev/documentation/webdriver/browsers/chrome/#log-output
I'm not sure why the return value of the Actions class wants to go through shadow root code to deserialize, I'd like to see what the driver itself is reporting.
Hi, Adding logs chrome_logs.txt selenium_new_logs_fine.txt
Thanks!
@diemol @titusfortner Do you have any updates?
So this error is coming after the logs call isDisplayed(). Which... that method includes shadow root logic, so maybe if it is trying to deserialize the result? The log keeps going, though. Are you rescuing this error? It looks like it keeps going until it gets an element not found exception.
But yeah, there's a lot of code there for us to walk through it. What's the minimum code required to reproduce this issue? Can you remove all the extra capabilities, and remove the factory and just start a default driver that hits this issue?
What happened?
Hello team
Not able to migrate from the 3.141.59 to the 4.21.0
Getting UnsupportedOperationException: getShadowRoot even I don't have any shadow elements in DOM and do not have a method that calls it
I'm using the next classes
Wrapper
`public class WebDriverWrapper implements WebDriver, Interactive { private final WebDriver originalWebDriver;
}`
WebDriverFactory public static WebDriver create(int timeout) { WebDriver driver = null; for (int i = 0; i <= 1; i++) { try { if (i > 0) { Thread.sleep(2000); } switch (Environment.getValue("test.browser")) { case "firefox": throw new UnsupportedOperationException("FireFox not supported"); case "chrome": ChromeOptions options = new ChromeOptions(); options.addArguments("--disable-extensions"); options.addArguments("no-sandbox"); options.addArguments("/high-dpi-support=1"); options.addArguments("/force-device-scale-factor=1"); if ("true".equals(Environment.getValue("chrome.headless"))) { options.addArguments("--headless=new"); options.addArguments("window-size=1920,1080"); } driver = new WebDriverWrapper(new ChromeDriver(options)); break; case "ie": throw new UnsupportedOperationException("internet Explorer not supported"); default: throw new UnsupportedOperationException("specify supported browser"); } driver.manage().timeouts().pageLoadTimeout(Duration.ofSeconds(timeout)); driver.manage().window().setSize(new Dimension(1920, 1080)); break; } catch (InterruptedException e) { System.out.println("interrupted initializing Driver"); throw new RuntimeException(e); } catch (Exception e) { e.printStackTrace(); log.info("Driver Couldn't be initialized in the attempt " + i); killDrivers(); } } return driver; }
Method to set Driver `public static void beforeSeleniumTestBase() { WebDriver driver = WebDriverFactory.create(30); driver.manage().window().maximize(); WebDriverAccessor.set(driver) WebDriverAccessor.get() }
WebDriverAccessor class WebDriverAccessor { static final ThreadLocal webDriverThreadLocal =
new ThreadLocal() {
}
}`
And Place in the test where It started to fail
WebDriver driver = WebDriverAccessor.get() Actions act = new Actions(driver) act.dragAndDrop(row, newplace).build().perform()
How can we reproduce the issue?
Relevant log output
Operating System
Windows 11
Selenium version
4.21.0
What are the browser(s) and version(s) where you see this issue?
Chrome 125.0.6422.142
What are the browser driver(s) and version(s) where you see this issue?
chromedriverVersion: 125.0.6422.141
Are you using Selenium Grid?
No response