← Quiz: Page Object Model: all 10 questions
Quiz: Page Object Model · Question 9 of 10
Why are URLs and browser names passed with -D properties instead of hard-coded?
Why are URLs and browser names passed with -D properties instead of hard-coded?
- A.Hard-coded values do not compile
- B.So the same tests can run against different environments and browsers without code changes
- C.Properties make tests faster
- D.Maven forbids strings in tests
Answer & explanation
Correct answer: So the same tests can run against different environments and browsers without code changes
For example: -Dbrowser=firefox -Dheadless=true.
Can you get the rest right without peeking?
Take the timed Quiz: Page Object Model quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →