need to click on particular object on website to load more content multiple time using python and chrome driver
<h1>need to click on particular object multiple times but it is executing only once. please help me</h1>

<pre><code>   from selenium import webdriver
   from selenium.webdriver.common.keys import Keys
   import time

   chrome_path=r"C:\Users\Bhanwar\Desktop\New folder (2)\chromedriver.exe"
   driver =webdriver.Chrome(chrome_path)
   driver.get("https://priceraja.com/mobile/pricelist/samsung-mobile-price-list-in-india")
   driver.implicitly_wait(10)
   i=0
   while i&lt;4:
        driver.find_element_by_css_selector('.loadMore').click()
        driver.implicitly_wait(10)
        i+=1
</code></pre>

<p>I think that the line <code>driver.implicitly_wait(10)</code> doesn't actually make the driver wait at that time, and because there is an element with a css selector of <code>.loadmore</code> in the page the whole time, that element may be getting clicked faster than the page can handle. Another way to check would be to get a css selector of a new element that only appears after the page changes. Each phone item (in this page) has a specific id, so you can check for the id of the last item to see how many items are in the page. The id seems to be "product-itmes-", itmes is correct, it is not items.</p>

<pre><code>from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec
from selenium.webdriver.common.by import By
import time

chrome_path=r"C:\Users\Bhanwar\Desktop\New folder (2)\chromedriver.exe"
driver =webdriver.Chrome(chrome_path)
driver.get("https://priceraja.com/mobile/pricelist/samsung-mobile-price-list-in-india")
driver.implicitly_wait(10)
i=0
time = 5
by = By.ID
hook = "product-itmes-"  # The id of one item, they seems to be this plus 
                         # the number item that they are
button = '.loadmore'
while i&lt;4:
     element_number = 25*i  # It looks like there are 25 items added each time, and starts at 25
     WebDriverWait(driver, time).
         until(ec.presence_of_element_located(by, hook+str(element_number)))
     driver.find_element_by_css_selector(button).click()
     time.sleep(1)  # Makes the page wait for the element to change
     i+=1
</code></pre>

python google-chrome selenium