Sobes.tech

QA / QA Automation

What can be used as an alternative to `yield` in pytest fixtures?

169

Have you worked with Selenium and Playwright?

168

# Create a list of three functions, where each function returns its number when called. # The first function should return - 0, the second - 1, the third - 2: funcs = [lambda: i for i in range(3)] print([f() for f in funcs]) # Answer:

164

Is it good to use XPath for finding elements?

164

Two tests pass separately, but when running the entire file, the second test fails. What does this indicate and how to fix it?

163

What is the difference between the `is` operator and the equality operator `==` in Python?

160

How to find an element if it doesn't have an `id` or class?

160

What is the difference between HTTP response codes 401 and 403?

156

Fix the `add_user` function that uses a mutable list as a default argument directly in the code.

149

Is it possible to mix explicit and implicit waits, as well as fixed-time waits, in a single test?

147

Can we say that tests are not isolated if they influence each other?

137

What testing design techniques do you know?

137

What will happen if you call the function `add_user` three times in a row with `print`?

135

What is the difference between HTTP response codes 200 and 204?

127

What does a decorator do in Python?

115

Why is the POST method usually not idempotent?

113

How do explicit waits differ from implicit waits in UI testing?

111

Did you have experience working with SQL at your previous job, and how did you work with it?

108

A test requires a UPP user who must be deleted after the test. How to ensure user cleanup even if the test fails?

107

# Python - identify the problem in the code and rewrite it without errors # Add a user to the list and return this list. # If the second argument is not specified during the call, return the user in the response. def add_user(user, users=[]): users.append(user) return users print(add_user("User")) # Create a list of three functions, where each function returns its number when called. # The first function should return - 0, the second - 1, the third - 2: funcs = [lambda: i for i in range(3)] print([f() for f in funcs])

106
/2