Hi
I've been building a very straight forward test but all of a sudden when I went to run it I got the following error message:
'XXXXXXModule' does not contain a definition for 'DefaultKeyPressTime' (CS0117)
I'm not sure what this means? On my other modules the same code looks fine. Any help appreciated.
Regards
Martin
Error message
-
- Posts: 254
- Joined: Tue Mar 24, 2015 5:05 pm
- Location: Des Moines, Iowa, USA
Re: Error message
In your module you've got the following method
So I tried to recreate this issue by removing that line of code outside of the code editor, but rebuilding it in Ranorex just re-adds it. I tried eliminating it from a usercode method and it doesn't throw an error.
Can you provide a few more details.
/// <summary> /// Performs the playback of actions in this recording. /// </summary> /// <remarks>You should not call this method directly, instead pass the module /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method /// that will in turn invoke this method.</remarks> [System.CodeDom.Compiler.GeneratedCode("Ranorex", "7.0")] void ITestModule.Run() { Mouse.DefaultMoveTime = 300; Keyboard.DefaultKeyPressTime = 100; Delay.SpeedFactor = 1.00; Init(); }The DeffualtKeyPressTime value is set at Keyboard.DefaultKeyPressTime = 100;
So I tried to recreate this issue by removing that line of code outside of the code editor, but rebuilding it in Ranorex just re-adds it. I tried eliminating it from a usercode method and it doesn't throw an error.
Can you provide a few more details.
- Specifically
- What version of Ranorex are we dealing with?
- What typeof module
- If possible could you provide the ITestModule.Run method for the specific module in question
Doug Vaughan
Re: Error message
Hi dude
Thanks for the reply, I simply removed the "Keyboard" module I'm testing and it now works as expected. The module had keyboard used a lot. I.e. variables and screenshots were called keyboard so I wonder if this was causing some confusion for the tool.
I'm running 6.2.1
It was a simple record and reply module I was making. I've now renamed the screenshots etc and it works.
Thanks for the reply, I simply removed the "Keyboard" module I'm testing and it now works as expected. The module had keyboard used a lot. I.e. variables and screenshots were called keyboard so I wonder if this was causing some confusion for the tool.
I'm running 6.2.1
It was a simple record and reply module I was making. I've now renamed the screenshots etc and it works.
Re: Error message
Hi,
I think name of the module is the source of your problem. Name of recording/code module cannot use the same name as Ranorex class names. So if you called it "Keyboard" you have the answer Just rename it to something else.
I think name of the module is the source of your problem. Name of recording/code module cannot use the same name as Ranorex class names. So if you called it "Keyboard" you have the answer Just rename it to something else.
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
-
- Posts: 254
- Joined: Tue Mar 24, 2015 5:05 pm
- Location: Des Moines, Iowa, USA
Re: Error message
That right there would do it! Been there, done similar!BeardMJ wrote:Hi dude
Thanks for the reply, I simply removed the "Keyboard" module I'm testing and it now works as expected. The module had keyboard used a lot. I.e. variables and screenshots were called keyboard so I wonder if this was causing some confusion for the tool.
I'm running 6.2.1
It was a simple record and reply module I was making. I've now renamed the screenshots etc and it works.
Doug Vaughan