Category : selenium-webdriver

I’m trying to web scrape this page and I’m looking for a way to click the load more button using selenium python. I have tried with these codes driver.find_element(By.LINK_TEXT, "Load more").click() driver.find_element_by_xpath(‘//*[@id="root"]/div/div[1]/div[1]/main/div[2]/div[1]/div/button/span’).click() driver.find_element_by_xpath(‘//*[@id="root"]/div/div[1]/div[1]/main/div[2]/div[1]/div/button’).click() but none of the above have worked the main code,My alternative solution was using the scroll like this… def infinite(driver): scroll_pause_time = ..

Read more

Not sure what I am missing here. Trying experiments with ActionChains and can’t get my mouse to move. Any thoughts? from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait driver = webdriver.Chrome() driver.get("https://www.google.com/") ship2usa(driver) time.sleep(2) button = driver.find_element_by_xpath("//input[@class=’gNO89b’]") action = webdriver.ActionChains(driver) action.move_to_element(button).click().perform() ..

Read more

I’m brand new to programming and need your help. I’m a fan of the website nofilmschool.com and like to save their blogposts as PDFs with Safari’s Reader View and print dialog. I use these PDFs for offline reading, highlighting, notetaking, etc. I use Safari because I can set "Use Reader Automatically" on a given domain. ..

Read more

I want to use Selenium with Gauge to grab data from a web page. I wrote the following code, using wait_for_element: from selenium.common.exceptions import TimeoutException from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from step_impl.mixins.exception import MixinException class MixinSelector(MixinException): def __init__(self, driver=None): super(MixinSelector, self).__init__(driver) self.wait_for_element_time = 60 def wait_for_elem(self, ..

Read more

When I do a scraping, not many records are saved in the database, only one. Precisely only 1 record is inserted for each "for" loop. On the other hand, many records should be inserted for each "for" loop. For example, if I have 3 groups (Group1, Group2, Group3), only 3 records are inserted in the ..

Read more

When I do a scraping, not many records are saved in the database, only one. Precisely only 1 record is inserted for each "for" loop. On the other hand, many records should be inserted for each "for" loop. For example, if I have 3 groups (Group1, Group2, Group3), only 3 records are inserted in the ..

Read more

I have automated to send the numbers from the numbers array one by one to text box as shown below, while the numbers are get it from the array and at the same time how to get the mail id randomly one by one from the email array? numbers = [2589001,2589002,2589003,2589004,2589005,2589006,2589007,2589008,2589009,2589010] email = ["[email protected]","[email protected]","[email protected]","[email protected]","[email protected]"] c ..

Read more

I’m trying to develop a "bot" to make purchase faster on "zalando" website. For example, assume I want to buy this: https://www.zalando.it/nike-sportswear-air-force-1-07-lv8-sneakers-basse-whiteblackwolf-grey-ni112o0m9-a11.html I need a code for select the shoe size from the menu (check the link or the image below), I tried with "Select" funcion: from selenium import webdriver from selenium.webdriver.common.keys import Keys from ..

Read more