I'm trying to scroll inner page of Facebook Meta Ads Library using python selenium, As i have tried most of method that are available on internet Such as
ele =driver.find_elements(By.XPATH, '//div[@class="x78zum5 xdt5ytf x5yr21d xedcshv x1t2pt76 xh8yej3"]')[-1]
driver.execute_script("arguments[0].scrollTop = arguments[0].scrollHeight", ele)
But Seems like I'm not able to figure out of correct Xpath of inner page side scroll.
You're just supplying the wrong class name. Instead of selecting the class of the whole box that appears, go for the listbox itself. This class worked for me:
x1iyjqo2 x1iorvi4 x150jy0e xjkvuk6 x1e558r4 x1t137rt x78zum5 xdt5ytf xu3tz18 x1oux0zi
By the way, the class names are probably dynamic. Which means that the classes will change in the near future, or it's linked to your session or IP or cookies (which is also why you see it as random characters).
I recommend selecting that listbox by the XPATH, which you could copy and paste from your browser (won't always work, so try to craft the XPATH manually).
I hope this helped.