Multiple choice technology testing

How can you ensure that all the variables must be declared thin a script?

  1. You Can’t

  2. OptionDeclare

  3. Declare Explicit

  4. Option Explicit

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In VBScript (used in QTP/UFT), placing Option Explicit at the top of a script forces the developer to declare all variables before using them.