Hello everyone,
I have an code module where I am using 5 module variables.
When I added them through the Ranorex IDE by clicking "Insert new module variable" everything works fine and all 5 variables are shown in the Test suite view (see Module_Variables_Before_Refactoring.PNG).
But when I refactor those module variables in Visual Studio, by using "Show potential fixes" and click "convert to auto property" some module variables arent getting recognized anymore (see Module_Variables_After_Refactoring.PNG).
Only 2 from 5 module variables are beeing showed in test suite view now.
Do you have an idea why it works that way and how to fix it?
Question about module variables in Code modules
Question about module variables in Code modules
You do not have the required permissions to view the files attached to this post.
Re: Question about module variables in Code modules
Try getting rid of the default value setting i.e. = "" and = "Max" on the end of your properties. It wouldn't surprise me if that fixes it.
Re: Question about module variables in Code modules
Hello Stub,
removing the default value settings, like you mentioned, fixed my problem.
Now all module variables are beeing shown in the test suite.
Thanks for the help!
removing the default value settings, like you mentioned, fixed my problem.
Now all module variables are beeing shown in the test suite.
Thanks for the help!
Re: Question about module variables in Code modules
Hello,
now I realized it would be pretty nice, if I could still use a default value for my code module variables.
But as soon as, I add to one of my code module variables (e.x. = "Test") they aren' getting recognized in the test suite...
In the attachment there is a picture how the variables look like, after I add some default values.
Has anybody an idea how to add default values to code module variables, as they look like in my code?
And not the way Ranorex generates them by default?
now I realized it would be pretty nice, if I could still use a default value for my code module variables.
But as soon as, I add to one of my code module variables (e.x. = "Test") they aren' getting recognized in the test suite...
In the attachment there is a picture how the variables look like, after I add some default values.
Has anybody an idea how to add default values to code module variables, as they look like in my code?
And not the way Ranorex generates them by default?
You do not have the required permissions to view the files attached to this post.
Re: Question about module variables in Code modules
Hi,
My guess is, that the way you like it is simply from an unsupported C# version? Anyway, is there something wrong with the way Ranorex generates code module variables? Or is just aesthetic issue?
My guess is, that the way you like it is simply from an unsupported C# version? Anyway, is there something wrong with the way Ranorex generates code module variables? Or is just aesthetic issue?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Question about module variables in Code modules
Yes it's basically an aesthetic issue
Here https://stackoverflow.com/questions/407 ... tial-value I read that since C# 6.0, you can specify initial value in-line, like i would like. Do you know if this version is supported by Ranorex?
Re: Question about module variables in Code modules
Hi,
I believe that actual Ranorex 9.3.2 supports C# up to version 7? The thing is, that Ranorex supports compiling of such projects, but its code completion and syntax checker definitely does not support all C# 6/7 specific goodies. Which means, that your requested inline variable syntax is supported and Ranorex successfully compiles projects with such variables. These variables can even be used in code. It's just that you will not see them in the list of available variables or you will not be able to examine their content during debugging (by hovering mouse over them). So if I were you, I would ignore the aesthetic issue and simply use supported syntax And of course, you can make a feature request here:
https://uservoice.ranorex.com/forums/15 ... ve-ranorex
I believe that actual Ranorex 9.3.2 supports C# up to version 7? The thing is, that Ranorex supports compiling of such projects, but its code completion and syntax checker definitely does not support all C# 6/7 specific goodies. Which means, that your requested inline variable syntax is supported and Ranorex successfully compiles projects with such variables. These variables can even be used in code. It's just that you will not see them in the list of available variables or you will not be able to examine their content during debugging (by hovering mouse over them). So if I were you, I would ignore the aesthetic issue and simply use supported syntax And of course, you can make a feature request here:
https://uservoice.ranorex.com/forums/15 ... ve-ranorex
You do not have the required permissions to view the files attached to this post.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Question about module variables in Code modules
Hello,
alright, thanks for the explanation!
Because of the fact, that I need to see those variables in a list (especially in the test suite view, under Data Binding) I will go with the Ranorex Syntax.
Of course, I could make an feature request, but there are already so many reports, that I want the Production team to focus on that
Especially requests like improving the API documentation or IDE are really needed.
alright, thanks for the explanation!
Because of the fact, that I need to see those variables in a list (especially in the test suite view, under Data Binding) I will go with the Ranorex Syntax.
Of course, I could make an feature request, but there are already so many reports, that I want the Production team to focus on that
Especially requests like improving the API documentation or IDE are really needed.