Page 1 of 1

Way To access Information in code.

Posted: Tue Oct 13, 2015 8:36 am
by santamaria
Hello everybody.
I have standart project, test suite, do not have a code library in my solution.

I have user codes in my some of recordings, I want a general-purpose user code and I want to access ıt from other recording modules. How can I achieve it ?

instead of putting it inside a recording module and call module under test cases,I want to call it from recording modules. How can I access mu public Sub from another user code.vb ?

Thanks a lot!

Re: Way To access Information in code.

Posted: Tue Oct 13, 2015 9:06 am
by odklizec
Hi,

You can achieve your goal using something called Inheritance. Please take a look at this post:
http://www.ranorex.com/forum/function-l ... tml#p26060

The "inheritance" syntax is slightly different in VB code. Instead of code like this:

Code: Select all

public partial class Recording1:Common  
you should use code like this:

Code: Select all

Public Partial Class Recording1
	Inherits Common
Once done, you should be able to access the "common" methods from any recording, from which you inherit the "common" code module. Hope this helps?