I'm having trouble understanding what are the differences between these two blocks of codes. Sending clicks both work in webdriverwait and find_elements.
Code 1
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
driver = webdriver.Chrome(options=options)
wait = WebDriverWait(driver, 45)
wait.until(EC.presence_of_element_located((By.LINK_TEXT, "ABC"))).click()
Code 2
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
driver = webdriver.Chrome(options=options)
wait = WebDriverWait(driver, 45)
wait.until(EC.presence_of_element_located((By.LINK_TEXT, "ABC")))
driver.find_element(By.LINK_TEXT,"ABC").click()
presence_of_element_located()returns the element (if found), the second code is redundantly finding the element again.