Skip to content

Commit

Permalink
selenium: update logging
Browse files Browse the repository at this point in the history
  • Loading branch information
naisanzaa committed Oct 8, 2024
1 parent c77a9ae commit 4a0cec7
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions automon/integrations/seleniumWrapper/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,14 @@ def find_anything(

if FOUND and FOUND not in MATCHED:
logger.debug(
f'find_anything :: {self.current_url} :: {MATCH=} :: {AGAINST=} :: attribute={dir_} :: {element=} :: found')
f'find_anything :: '
f'{self.current_url} :: '
f'{MATCH=} :: '
f'{AGAINST=} :: '
f'attribute={dir_} :: '
f'{element=} :: '
f'found'
)
MATCHED.append(FOUND)

if return_first:
Expand Down Expand Up @@ -982,7 +989,15 @@ def wait_for_anything(
return find

except Exception as error:
logger.error(f'wait_for_anything :: failed :: {error=} :: {match=} :: {value=} :: {by=}')
logger.error(
f'wait_for_anything :: '
f'failed :: '
f'timeout {timeout_elapsed}/{timeout} sec :: '
f'{error=} :: '
f'{match=} :: '
f'{value=} :: '
f'{by=}'
)

timeout_elapsed = round(abs(timeout_start - time.time()), 1)

Expand Down Expand Up @@ -1022,7 +1037,14 @@ def wait_for_element(
return find

except Exception as error:
logger.error(f'wait_for_element :: failed :: {error=} :: {value=} :: {by=}')
logger.error(
f'wait_for_element :: '
f'failed :: '
f'timeout {timeout_elapsed}/{timeout} sec :: '
f'{error=} :: '
f'{value=} :: '
f'{by=}'
)

timeout_elapsed = round(abs(timeout_start - time.time()), 1)

Expand Down

0 comments on commit 4a0cec7

Please sign in to comment.