Page 1 of 1

refering a global parameter withinn a class

Posted: Fri Jul 01, 2016 9:05 am
by sandamal
hi,

If I'm writing a c# class withing ranorex project (basically to open a connection with sqlserver DB) how can i refer the global parameters within it.

Not via data binding in UI.

> Connection string is in a global parameter.

Re: refering a global parameter withinn a class

Posted: Fri Jul 01, 2016 9:34 am
by odklizec

Re: refering a global parameter withinn a class

Posted: Fri Jul 01, 2016 10:27 am
by Martin
Can't really figure out the "Object reference not set to an instance of an object" exception (NullReference).

Re: refering a global parameter withinn a class

Posted: Fri Jul 01, 2016 11:53 am
by odklizec
I guess you started an individual module instead of entire TestSuite? Global Parameters are a part of Test Suite! So you must start the whole TestSuite, not just individual module!

Re: refering a global parameter withinn a class

Posted: Fri Jul 01, 2016 11:54 am
by Martin
Ofcourse! Thanks for the hint. I actually knew that the context exists as such.