Skip to content

Commit

Permalink
fix ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
dmy.berezovskyi committed Oct 7, 2024
1 parent b731cd4 commit bce35d5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/locators/locators.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ class General:


class TextFields:
USER_NAME = (By.ID, "userName")
USER_NAME = (By.ID, "userName")
12 changes: 5 additions & 7 deletions src/pageobjects/base_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Tuple, Optional, Literal
from selenium.webdriver.common.by import By
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support import expected_conditions as ec
from selenium.webdriver.support.wait import WebDriverWait
from selenium.common.exceptions import (
TimeoutException, ElementNotVisibleException
Expand Down Expand Up @@ -57,10 +57,10 @@ def wait_for(
waiter = waiter or self._wait

conditions = {
"clickable": EC.element_to_be_clickable(locator),
"clickable": ec.element_to_be_clickable(locator),
# Pass the locator tuple as a single argument
"visible": EC.visibility_of_element_located(locator),
"present": EC.presence_of_element_located(locator),
"visible": ec.visibility_of_element_located(locator),
"present": ec.presence_of_element_located(locator),
}

if condition not in conditions:
Expand Down Expand Up @@ -89,9 +89,7 @@ def click(

# @log()
# @timing
def set(
self, locator: Locator, text: str, wait_type: Optional[WaitType] = None
):
def set(self, locator: Locator, text: str, wait_type: Optional[WaitType] = None):
"""
Set text in an input field.
"""
Expand Down
2 changes: 1 addition & 1 deletion src/pageobjects/text/fill_form.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from locators.locators import TextFields
from pageobjects.base_page import BasePage
from utils.logger import log, Logger
from utils.logger import log


class FillForm(BasePage):
Expand Down

0 comments on commit bce35d5

Please sign in to comment.