What are fixtures in pytest? How do they look and work?
QA / QA Automation
What is your experience with SQL?
What tasks are you looking for: what would you like and not like to do?
What is a tuple and what data types in Python are mutable and immutable?
What is a Page Object and why is it needed? What will happen if this pattern is not used?
What happened, why are you looking for a job now?
How did you learn automation: independently, through courses, or thanks to specialized education?
What is the BasePage class and why is it needed?
""" self.fill_credentials(username, password) self.login_button.click() return Self.page def login_expecting_failure(self, username: str, password: str): """ Unsuccessful login. The actions are the same, but I return self, because in case of an error we stay on the same page. Two separate methods instead of one universal are made intentionally: so that in the test it is clear what result is expected. """ self.fill_credentials(username, password) self.login_button.click() return self
What is the __init__ method and what is meant by creating an object?
What is *args and **kwargs? What data structures do they form?
What approach to locating locators do you use in Playwright and why? What will happen to getByLabel if the ID of the related field changes in HTML?
def __init__(self, page) -> None: super().__init__(page) # Fields have normal labels, so I look for them the same way a user sees them, # not by id or CSS class, which a layout designer can rename at any moment self.username_input = page.get_by_label("Username") self.password_input = page.get_by_label("Password") self.login_button = page.get_by_role("button", name="Login") # The form is needed to check that we haven't navigated away in negative tests self.login_form = page.locator("form#login") # The flash message, it is the same for success and error self.flash_message = page.locator("#flash") def fill_credentials(self, username: str, password: str): self.username_input.fill(username) self.password_input.fill(password) return self def login(self, username: str, password: str) -> SecurePage: """
Why does the open method return self and how is it used in tests?
How does XPath differ from CSS besides syntax and what search method do you prefer?
What is the __init__ method and why is it needed?
Briefly tell us about yourself: how much experience do you have, what have you been doing, and what was the most interesting from the perspective of automated testing?