Private keywords visible in listbox
Posted: Thu Oct 10, 2013 9:06 am
Hi,
I'm runing Ranorex 4.1.1. on Windows Server 2008 R2 Standard.
I'm using the second approach (Keyword-Driven Framework using the Actions Table) from this blog http://www.ranorex.com/blog/keyword-dri ... -framework to create keywords.
I created following keyword class, which contains my actual keywords as well as helper methods which are marked as private.
In the listbox that offers the methods available all methods appear, the public as well as the private ones (see Screenshot). This is a bug, since the private methods should not be visible and should not be allowed to select. If I select one it will raise a compiler error. (see screenshot)
Christoph
I'm runing Ranorex 4.1.1. on Windows Server 2008 R2 Standard.
I'm using the second approach (Keyword-Driven Framework using the Actions Table) from this blog http://www.ranorex.com/blog/keyword-dri ... -framework to create keywords.
I created following keyword class, which contains my actual keywords as well as helper methods which are marked as private.
public class KeywordTestClass { public KeywordTestClass() { } public void MyFunctionOne() { _MyHelperOne(); } public void MyFunctionTwo() { _MyHelperTwo(); } private void _MyHelperOne() { // do something } private void _MyHelperTwo() { // do something } }I then create a recording and in the "userCode" class of the recording I inherit my keyword class.
public partial class UseKeyWords:KeywordTestClass { /// <summary> /// This method gets called right after the recording has been started. /// It can be used to execute recording specific initialization code. /// </summary> private void Init() { // Your recording specific initialization code goes here. } }In the recording I add user code with "Add New Action" --> "User Code"
In the listbox that offers the methods available all methods appear, the public as well as the private ones (see Screenshot). This is a bug, since the private methods should not be visible and should not be allowed to select. If I select one it will raise a compiler error. (see screenshot)
Christoph