I am trying to scroll within a iframe. However, I am really struggling to find a way to do it. Any help would be greatly appreciated
driver.switch_to.default_content() #switch to default frame
driver.switch_to.frame("Desktop Innerpage ") # switch to table subframe
driver.switch_to.frame("Edit/Display Opportunity ") # switch to Opp_table
rows = driver.find_elements_by_xpath('//*[@id="WD48-contentTBody"]') #row list
driver.execute_script('frame.contentWindow.scrollTo(0,100);')
time.sleep(1)
An error shows that frame is not defined. I have gone through the below reated thread, but none have resolved that issue:- Python Selenium: Unable to scroll inside iframe scroll an iframe from parent page