I am trying to update Xpatht but dont know which elements are you trying to find in lines 62, 66, 68 and 72
Thanks in advance.
letter = self.driver.find_element(By.CSS_SELECTOR, 'div.css-1nxi1g2:nth-child(1) > h2:nth-child(1)').text
if int(letter) > 0:
print(str(letter) + " are available")
try:
self.driver.find_element(By.CSS_SELECTOR, 'div.css-uirvwh:nth-child(2) > ul:nth-child(1) > div:nth-child(1) > a:nth-child(1) > div:nth-child(1)').click()
time.sleep(3)
self.driver.find_element(By.CSS_SELECTOR, '.css-1aros5x').click()
except NoSuchElementException:
print("")
try:
self.driver.find_element(By.XPATH, '/html/body/div/div[3]/div[3]/div/a[1]/div').click()
time.sleep(3)
self.driver.find_element(By.CSS_SELECTOR, 'div.css-uirvwh:nth-child(2) > ul:nth-child(1) > div:nth-child(1) > a:nth-child(1) > div:nth-child(1)').click()
time.sleep(3)
self.driver.find_element(By.CSS_SELECTOR, '.css-1aros5x').click()