Check the availability & time delay

This commit is contained in:
2023-05-09 19:02:36 -04:00
parent 8ed9dfbdf3
commit 7df52c95e1
2 changed files with 97 additions and 33 deletions
+5 -5
View File
@@ -32,7 +32,7 @@ driver.delete_all_cookies
driver.get(url)
# time.sleep(5)
time.sleep(5)
time.sleep(2)
# Close the cookies setting window
try:
cookie_button = driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div[3]/button")
@@ -41,13 +41,13 @@ try:
except:
pass
time.sleep(5)
time.sleep(1)
# Clear any modal dialog
try:
modal_close = driver.find_element(By.XPATH, "//*[contains(concat(' ', normalize-space(@class), ' '), ' icon-icon-close-s ')]")
print(f"modal_close = {modal_close}")
modal_close.click()
time.sleep(2)
#time.sleep(2)
except:
pass
@@ -60,7 +60,7 @@ def callback(message):
try:
try:
time.sleep(5)
time.sleep(2)
# Clear any modal dialog
modal_close = driver.find_element(By.XPATH, "//*[contains(concat(' ', normalize-space(@class), ' '), ' icon-icon-close-s ')]")
# print(f"modal_close = {modal_close}")
@@ -100,7 +100,7 @@ def callback(message):
time.sleep(2)
try:
time.sleep(5)
time.sleep(2)
# Clear any notice
notice_close = driver.find_element(By.XPATH, "/html/body/div[3]/div/div[2]/div/div[2]/div/div/div[1]/div[2]/button")
print(f"notice_close = {notice_close}")