pmadhu3633

crewnetwork.org

Sep 6th, 2021
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. from selenium import webdriver
  2. import time
  3. from selenium.webdriver.common.action_chains import ActionChains
  4. from selenium.webdriver.common.keys import Keys
  5.  
  6. driver = webdriver.Chrome(executable_path="C:\expediaproject\Chromedriver\chromedriver.exe")
  7. driver.maximize_window()
  8. driver.implicitly_wait(10)
  9. driver.get("https://www.connectcre.com/atlanta-southeast/")
  10. time.sleep(10)
  11. more = driver.find_element_by_xpath("//div[@id='ajax-load-more-2']/div[2]/button")
  12. try:
  13. more.click()
  14. except:
  15. actions.send_keys(Keys.DOWN).perform()
  16. driver.find_element_by_xpath("//div[@id='ajax-load-more-2']/div[2]/button").click()
  17. time.sleep(5)
  18. driver.quit()
Advertisement
Add Comment
Please, Sign In to add comment