Way To access Information in code.

Ask general questions here.
Posts: 2
Joined: Sat Oct 10, 2015 9:56 am
Location: tech

Way To access Information in code.

Post by santamaria » Tue Oct 13, 2015 8:36 am

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!
Last edited by santamaria on Wed Oct 28, 2015 10:39 am, edited 1 time in total.
Cộng đồng chuyên về đăng ký internet fptlắp mạng fpt hoàng mailắp mạng fpt vinh nhanh nhất.
Khi các bạn có nhu cầu lắp mạng fpt phan thiếtlắp mạng fpt nha trang hãy liên hệ với chúng tôi.

User avatar
Ranorex Guru
Ranorex Guru
Posts: 3922
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Way To access Information in code.

Post by odklizec » Tue Oct 13, 2015 9:06 am


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?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration