Evaluation function - QTP

The related Eval function is used to evaluate a statement:

'assigns a value 2 to x Execute "x = 2"

'Compare x with 3. This will give False MsgboxEval("x = 3")

Problem: How can we declare and initialize a read only variable at run-time?

Sometime it's useful to declare a read-only initialized variable at run-time:

'define a read-only var at load time Const URL1 =B"www.wisdomjobs.com"

x = "www.wisdomjobs.com"

'define a read-only var/constant at run-time Execute "Const URL2 a " & x

Evaluation function


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

QTP Topics