2

enter image description here

I have attached the screenshot for my code and marked the element that i need to click in red. This element appears after we mouse over on another object - and mouse over is successful and i can see this element get displayed, but failed to click on it

My code is

var LinksSurce = sourceThumb.FindElement(By.ID("linkSource"));
     LinksSurce.Click();     

Error i am getting is Element not intractable

NOTE: i have already read and tried the solutions suggested on these posts but none of them working Selenium Web Driver & Java. Element is not clickable at point (x, y). Other element would receive the click

Debugging "Element is not clickable at point" error

Selenium - Element is not clickable at point

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
user8710571
  • 405
  • 2
  • 12
  • 25

1 Answers1

2

As per the screenshot you have shared the element is clearly within a #shadow-root (closed).

We have been discussing about Shadow DOM traversal support through Selenium for quite some time now and the key take aways are:

  • @43081j mentioned, for closed shadow roots it should just be accepted that you can't access it (throw an exception). So, we don't need to care about closed roots as we shouldn't be able to access them anyway.
  • @AutomatedTester in his spec proposal suggested the ability to move between a Shadow DOM context and the document context.

So currently you won't be able to interact with the elements within the #shadow-root (closed).


Conclusion

If the #shadow-root had been open we could have easily interacted with the desired element. You can find a couple of relevant discussions in:


Alternative

Shadow root DOM automation using selenium


References

A couple of pull requests:

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352