scroll

Infinite scrolling of webpage using Selenium Python

Infinite scrolling of webpage using Selenium Python Question: I want to scroll till all the element is loaded. My code works well for starting till 7 8 pages using this code. driver.get(‘https://www.bigbasket.com/ps/?q=rice’) last_height = driver.execute_script("return document.body.scrollHeight") while True: # Scroll down to bottom driver.execute_script("window.scrollTo(0, document.body.scrollHeight);") # Wait to load page WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, ‘//div[@class="show-more"]/button’))) driver.find_element_by_xpath(‘//div[@class="show-more"]/button’).click() # …

Total answers: 2

Tkinter – Scroll with mousepad / mouse gestures / two fingers scrolling in tkinter?

Tkinter – Scroll with touchpad / mouse gestures / two fingers scrolling in tkinter? Question: I wanted to implement two finger scrolling in tkinter. Here is the result of my own attempt: import tkinter as tk class Scene: def __init__(self, canvas): self.canvas = canvas self.elements = [ { "type": "rect", "x": canvas.winfo_width() / 2, "y": …

Total answers: 1

Resize scroll for checkbox tkinter

Resize scroll for checkbox tkinter Question: After several tests and help received, I managed to get the code for a scroll with several checkboxes inside. My current problem is that the scroll is much larger than the space it needs and in general I can’t change its size to my liking. This is my code: …

Total answers: 2

Clear old Matplotlib data?

Clear old Matplotlib data? Question: I am attempting to plot live CPU data from my computer and update the corresponding graph to display the data. The chart scrolls as intended, but there’s one major problem. As time goes on, the data (likely stored within Matplotlib) doesn’t get deleted. I can successfully keep the actual python …

Total answers: 1

Selenium, how to locate and click a particular button

Selenium, how to locate and click a particular button Question: I’m using selenium to try and scrape a listing of products in this website: https://www.zonacriativa.com.br/harry-potter However, I’m having trouble getting the full listing of products. the page list 116 products, yet only a few are shown at a time. If I want to see the …

Total answers: 1

Selenium .click() works very inconsistent

Selenium .click() works very inconsistent Question: Website: https://www.annualreports.com/Companies? I want to identify the links on the website using the linktext, e.g. a companies name and click the respective link: company = "1-800-FLOWERS" browser.get(r’https://www.annualreports.com/Companies?’) continue_link = browser.find_elements(By.XPATH,f"//span[@class=’companyName’][.//a[contains(.,'{company}’)]]") if len(continue_link) == 0: print("No Firm Found") elif len(continue_link) > 1: print("Multiple Firms Found") elif len(continue_link) == 1: print("Firm …

Total answers: 1

How to Scroll the Left Quadrant

How to Scroll the Left Quadrant Question: How can I make Selenium run scroll only in the left quadrant? when I use the command below it is executed in the zoom of the map and that is not my intention, because I want to scrape the links of the companies that are in the left …

Total answers: 1

cannot click load more button with selenium

cannot click load more button with selenium Question: I’m trying to click load more button several times using selenium, however I cannot click load more button (it is even not a button…) When I try to click it, it shows error element click intercepted: Element is not clickable at point even after I explicitly code …

Total answers: 2

Selenium Scroll Down Facebook Album Several Times

Selenium Scroll Down Facebook Album Several Times Question: I try to scraping Facebook album but there is two scroll bar in the page and I want to know how to locating the inside scroll bar so it can automatically scroll down I try to use driver.execute_script("window.scrollTo(0,document.body.scrollHeight);") but it doesn’t work. I also tried driver.find_element(By.TAG_NAME,"body").send_keys(Keys.PAGE_DOWN) but …

Total answers: 1