Variables enhance tests by providing the ability to store data values for use in other parts of the script. Data can also be output to other types of files.
The sample application displays a unique email address on the Get Instant Auto Quote page. The text on this page containing the email address is the property value of a control on the page.
In this lesson, you will store this text to the local variable stremailAddr.
.DomTextField("autoquoteEMail").SetText("jsmith@gmail.com")
Dim StremailAddr As String StremailAddr = .DomTextField("autoquoteEMail").Text
This step creates a new local variable, StremailAddr, that stores the email address text from the Get Instant Auto Quote page page to the local variable.
Console.Write (StremailAddr)
To confirm that the test captures the property value and stores it properly, play back the test and review the result.