diff --git a/AutoColor2.py b/AutoColor2.py index 8f4fd83..54e6cd8 100644 --- a/AutoColor2.py +++ b/AutoColor2.py @@ -41,7 +41,8 @@ def dumb_make_tags(queues,tags,driver): for tag in tags: if found_string(queues, tag.text.lower()) == False: driver.execute_script("arguments[0].scrollIntoView(true);", tag) - ac.context_click(tag).perform() + tag_href = tag.find_element(By.TAG_NAME, "a").get_attribute("href") + driver.execute_script("window.open(arguments[0]);", tag_href) WebDriverWait(driver, 10).until(EC.number_of_windows_to_be(2)) for window_handle in driver.window_handles: if window_handle != original_window: @@ -81,7 +82,8 @@ def guided_make_tags(queues,tags,driver): for tag in tags: if found_string(queues, tag.text.lower()) == False: driver.execute_script("arguments[0].scrollIntoView(true);", tag) - ac.context_click(tag).perform() + tag_href = tag.find_element(By.TAG_NAME, "a").get_attribute("href") + driver.execute_script("window.open(arguments[0]);", tag_href) WebDriverWait(driver, 10).until(EC.number_of_windows_to_be(2)) for window_handle in driver.window_handles: if window_handle != original_window: @@ -127,7 +129,8 @@ def smart_make_tags(queues,tags,driver): if found_string(queues, tag.text.lower()) == False: lowest_queue = find_lowest_and_increment(tag_count) driver.execute_script("arguments[0].scrollIntoView(true);", tag) - ac.context_click(tag).perform() + tag_href = tag.find_element(By.TAG_NAME, "a").get_attribute("href") + driver.execute_script("window.open(arguments[0]);", tag_href) WebDriverWait(driver, 10).until(EC.number_of_windows_to_be(2)) for window_handle in driver.window_handles: if window_handle != original_window: