Skip to content

Commit

Permalink
selenium: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
naisanzaa committed Jul 11, 2024
1 parent a985140 commit aed7efe
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions automon/integrations/seleniumWrapper/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ def keys(self):

async def refresh(self):
self.webdriver.refresh()
logger.info(f'{True}')
logger.info(dict(
refresh_page=self.current_url
))

@property
def url(self):
Expand Down Expand Up @@ -728,8 +730,7 @@ async def wait_for(
value: str,
by: By = By.XPATH,
timeout: int = 1,
**kwargs
) -> selenium.webdriver.Chrome.find_element:
**kwargs) -> selenium.webdriver.Chrome.find_element:
"""wait for an element"""
timeout_start = time.time()
timeout_elapsed = round(abs(timeout_start - time.time()), 1)
Expand Down Expand Up @@ -760,8 +761,7 @@ async def wait_for_list(
values: list,
by: By = By.XPATH,
timeout: int = 1,
**kwargs
) -> selenium.webdriver.Chrome.find_element:
**kwargs) -> selenium.webdriver.Chrome.find_element:
"""wait for a list of elements"""
if isinstance(values, list):
for value in values:
Expand All @@ -787,8 +787,7 @@ async def wait_for_element(
self,
element: str or list,
timeout: int = 1,
**kwargs
) -> selenium.webdriver.Chrome.find_element:
**kwargs) -> selenium.webdriver.Chrome.find_element:
"""wait for an element"""
if isinstance(element, list):
return await self.wait_for_list(
Expand All @@ -806,7 +805,7 @@ async def wait_for_xpath(
self,
xpath: str or list,
timeout: int = 1,
**kwargs) -> str or False:
**kwargs) -> selenium.webdriver.Chrome.find_element:
"""wait for an xpath"""
if isinstance(xpath, list):
return await self.wait_for_list(
Expand Down

0 comments on commit aed7efe

Please sign in to comment.