Cannot scroll down to an element that is not in view using selenium-ruby

0 votes
I'm trying to search for an element which is wrapped in cdk-virtual-scroll-viewport. I've used the below javascript code to search element but it always says element not found.

meeting=@driver.find_element(:xpath,'<element locator>')

@driver.execute_script("arguments[0].scrollIntoView(true);",meeting)
Aug 19, 2019 in Selenium by Tester
3,510 views