0

I am working on Instagram Bot using Python language and Selenium.

I am facing issue in scrolling down the pop-up window. Using basic Javascript code for scrolling, i.e

driver.execute_script("window.scrollBy(0,500)","")

it could only scroll the main window, not the child window(that needs to be scrolled)

I have attached a detailed picture of what I want.

enter image description here

Paolo Mossini
  • 1,064
  • 2
  • 15
  • 23
  • you need to switch to the popup first: https://stackoverflow.com/questions/10629815/how-to-switch-to-new-window-in-selenium-for-python – gOAT Oct 09 '20 at 13:16
  • I tried but it is showing.. "List Index out of range" for driver.window_handles[1] Here is the code: window_before = driver.window_handles[0] Following_Window=driver.find_element_by_xpath("//a[contains(@href,'/following')]").click() --------- window_after = driver.window_handles[1] – Khaqan Ahmed Oct 10 '20 at 14:34

0 Answers0