Skip to content

Commit

Permalink
Fixed: inconsistent error on login "Message: unknown error: Element […
Browse files Browse the repository at this point in the history
…...] is not clickable at point (1085, 97). Other element would receive the click: [...]
  • Loading branch information
timelyart committed Feb 19, 2019
1 parent 7b28e6d commit 31d1af4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tv/tv.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ def retry_take_screenshot(browser, symbol, interval, retry_number=0):
browser.refresh()
# Switching to Alert
try:
alert = browser.switch_to_alert()
alert = browser.switch_to.alert()
alert.accept()
time.sleep(5)
except NoAlertPresentException:
Expand Down Expand Up @@ -951,7 +951,7 @@ def retry(browser, alert_config, timeframe, interval, ticker_id, screenshot_url,
log.info('Trying again (' + str(retry_number+1) + ')')
browser.refresh()
# Switching to Alert
alert = browser.switch_to_alert()
alert = browser.switch_to.alert()
alert.accept()
time.sleep(5)
# change symbol
Expand Down Expand Up @@ -1073,8 +1073,7 @@ def login(browser, uid='', pwd='', retry_login=False):
exit(0)

try:
wait_and_click(browser, css_selectors['username'])
elem_username = browser.find_element_by_css_selector(css_selectors['username'])
elem_username = wait_and_get(browser, css_selectors['username'])
if type(elem_username) is WebElement and elem_username.get_attribute('textContent') != '' and elem_username.get_attribute('textContent') == uid:
TV_UID = uid
TV_PWD = pwd
Expand Down

0 comments on commit 31d1af4

Please sign in to comment.