Forum Discussion

smccafferty's avatar
smccafferty
Occasional Contributor
10 years ago

Setting Project Variable at Test Time...

...and comparing the test variable to screen elements.



Need help with the following:

1. Create the Variable (this is created from the nameStr of an image on the screen)

2. Compare the variable to the nameStr of other images in the website (that are meant to adopt the namestr of the parent specified in 1.)



Thanks!

1 Reply

  • chrisb's avatar
    chrisb
    Regular Contributor
    Note sure what you want to do. If you are talking about creating a new project variable on the fly then do this.

    Project.Variables.AddVariable()

    or

    ProjectSuite.Variables.AddVariable()

    Then compare your project variable to another

    if (Project.Variable.varName = anotherVar){
    //do something
    }