forked from SVIG/python-bootcamp
Check the availability & time delay
This commit is contained in:
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user