Hiya
In Ranorex 301
Is there no way to programatically configure the GDI/RawText plugin?
Perhaps not in the standard API, but some configuration class I can dynamically load?
The problem is we have a test dev environment and a test execution environment
And we dont want to have to move the config file between these environments each time a developer
writes a test that needs this enabled on a certain control
Thanks
GDI Plugin Configuration
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: GDI Plugin Configuration
Hi,
With following lines of code you can add process and class names programatically to the config of your RawText.
Peter
Ranorex Team
With following lines of code you can add process and class names programatically to the config of your RawText.
//To add the process name to the config RawTextFlavor.Instance.ProcessNames.Add(new Regex("processname pattern")); //To add the class name to the config RawTextFlavor.Instance.ClassNames.Add(new Regex("classname pattern"));Don't forget to add the namespace
using Ranorex.Plugin;Regards,
Peter
Ranorex Team
Re: GDI Plugin Configuration
Excellent thanks!
Re: GDI Plugin Configuration
I have following entry in my "GDI Capture Settings -> Window Class Names":
GXWND.*
So, i decided to try API, mentioned above.
I removed my entry from "GDI Capture Settings -> Window Class Names" and added this code to recording module:
Ranorex.ElementNotFoundException: Failed to find item 'Review1Repository.FormSelect_Procedure.FirstRowN' within the specified timeout of 3000ms. ---> Ranorex.ElementNotFoundException: No element found for path 'element/element[@controlid='1013']/rawtext[@column='0' and @row='1']' within 3000ms.
--- End of inner exception stack trace ---
at Ranorex.Core.Repository.RepoItemInfo.Find[T](Boolean findSingle, Boolean throwException)
at Ranorex.Core.Repository.RepoItemInfo.CreateAdapter[T](Boolean throwException)
at Review1.Review1RepositoryFolders.FormSelect_ProcedureAppFolder.get_FirstRowN() in c:\AutoRex\Review\Review1\Review1Repository.cs:line 2162
What did i do wrong? Why it's not working?
P.S. Here is screenshot of base class: As you can see it's name is GXWND. So i tried to use "GXWND" without *, but result is same.
GXWND.*
So, i decided to try API, mentioned above.
I removed my entry from "GDI Capture Settings -> Window Class Names" and added this code to recording module:
RawTextFlavor.Instance.ClassNames.Add(new Regex("GXWND.*"));But got following error:
Ranorex.ElementNotFoundException: Failed to find item 'Review1Repository.FormSelect_Procedure.FirstRowN' within the specified timeout of 3000ms. ---> Ranorex.ElementNotFoundException: No element found for path 'element/element[@controlid='1013']/rawtext[@column='0' and @row='1']' within 3000ms.
--- End of inner exception stack trace ---
at Ranorex.Core.Repository.RepoItemInfo.Find[T](Boolean findSingle, Boolean throwException)
at Ranorex.Core.Repository.RepoItemInfo.CreateAdapter[T](Boolean throwException)
at Review1.Review1RepositoryFolders.FormSelect_ProcedureAppFolder.get_FirstRowN() in c:\AutoRex\Review\Review1\Review1Repository.cs:line 2162
What did i do wrong? Why it's not working?
P.S. Here is screenshot of base class: As you can see it's name is GXWND. So i tried to use "GXWND" without *, but result is same.
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: GDI Plugin Configuration
Hi,
It seems the Plug-Ins are not loaded when you add your class to the config.
Please execute following line of code before you edit the config using the API.
Peter
Ranorex Team
It seems the Plug-Ins are not loaded when you add your class to the config.
Please execute following line of code before you edit the config using the API.
var plugins = Ranorex.Core.PluginManager.Instance; plugins.LoadDefaultPlugins();Regards,
Peter
Ranorex Team