Closed Aduomas closed 6 months ago
I believe there was an oversight issue of using the wrong By. ENUM parameter for this function.
file: anti_detect_driver.py
anti_detect_driver.py
def get_elements_or_none_by_xpath(self: WebDriver, xpath, wait=Wait.SHORT): try: if wait is None: return self.find_elements(By.XPATH, xpath) else: WebDriverWait(self, wait).until( EC.presence_of_element_located((By.CSS_SELECTOR, xpath)) ) return self.find_elements(By.XPATH, xpath) except: return None
the line EC.presence_of_element_located((By.CSS_SELECTOR, xpath))
EC.presence_of_element_located((By.CSS_SELECTOR, xpath))
should be changed to: EC.presence_of_element_located((By.XPATH, xpath))
EC.presence_of_element_located((By.XPATH, xpath))
Thanks, will fix in upcoming release
fixes
I believe there was an oversight issue of using the wrong By. ENUM parameter for this function.
file:
anti_detect_driver.py
the line
EC.presence_of_element_located((By.CSS_SELECTOR, xpath))
should be changed to:
EC.presence_of_element_located((By.XPATH, xpath))