Skip to content

Commit

Permalink
selenium: cleanup logging
Browse files Browse the repository at this point in the history
  • Loading branch information
naisanzaa committed Dec 27, 2023
1 parent a9f9119 commit c8892db
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions automon/integrations/seleniumWrapper/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,7 @@ def find_element(
"""find element"""
element = self.webdriver.find_element(value=value, by=by, **kwargs)
logger.info(str(dict(
url=self.url,
text=element.text,
current_url=self.current_url,
value=value,
)))
return element
Expand All @@ -320,8 +319,7 @@ def find_xpath(self, value: str, by: By = By.XPATH, **kwargs):
"""find xpath"""
xpath = self.find_element(value=value, by=by, **kwargs)
logger.info(str(dict(
url=self.url,
text=xpath.text,
current_url=self.current_url,
value=value,
)))
return xpath
Expand All @@ -332,7 +330,7 @@ def get(self, url: str, **kwargs) -> bool:
if self.webdriver.get(url, **kwargs) is None:
logger.info(str(dict(
url=url,
current_url=self._current_url,
current_url=self.current_url,
kwargs=kwargs
)))
return True
Expand Down

0 comments on commit c8892db

Please sign in to comment.