Re: Passing objects from test case to test case
Posted: Mon Mar 06, 2017 3:18 pm
Ok, so here's the solution, based on this thread and Ranorex support (thanks guys).
I have a class where I declare static variables with a get method. Apparently that's all it took. I was under the impression this couldn't be done, and so I never even gave it a shot. Talk about time wasted.
Anyway, here is an example:
I have a class where I declare static variables with a get method. Apparently that's all it took. I was under the impression this couldn't be done, and so I never even gave it a shot. Talk about time wasted.
Anyway, here is an example:
Code: Select all
static Element _varElement = null;
public static Element varElement
{
get
{
if(_varElement = null)
_varElement = repo.SomeElement;
return _varElement;
}
}