0

I need Selenium to click on an element in a div, but it keeps saying that the click is "intercepted." This is because the div scrolls down and the element I want it to click on requires scrolling down the div to become visible. How do I get Selenium to scroll to a specific point/element (I have its XPath to identify it) within that div?

Here's a screenshot from the page in question (I've redacted certain elements for privacy):

Screenshot

Rohan
  • 132
  • 4
  • 21
  • 1
    See if [this](https://stackoverflow.com/questions/3401343/scroll-element-into-view-with-selenium) helps –  Nov 13 '20 at 17:32
  • @JustinEzequiel still getting the same error and I can't see the browser scrolling. – Rohan Nov 13 '20 at 21:34
  • .click will scroll the element into view if necessary and then click on the center of that element. The intercepted error means that some other element will receive the click...(probably an overlay?) The exception should tell you which element is going to receive the click. Deal with that element first. (if it weren't in view, you'd see a different exception...) – pcalkins Nov 13 '20 at 22:09

0 Answers0