Playwright · Junior · Question 17 of 75
Which attribute does getByTestId('submit') look for by default?
- 1
data-test-name - 2
data-testid - 3
id
Show the answer
Correct answer: data-testid
Explanation
By default it matches data-testid="submit". The attribute name can be changed with testIdAttribute in the config, e.g. to data-qa.