Page 1 of 1

Testing MS Dynamic AX with Ranorex?

Posted: Tue Aug 23, 2011 10:46 am
by mathias
Dear members and support-team,

is it possible to testing Microsoft Dynamic AX with Ranorex?
Because there are different controllIDs for each new Application Instance and now windows names.

Thanks for help

Re: Testing MS Dynamic AX with Ranorex?

Posted: Tue Aug 23, 2011 12:58 pm
by Support Team
Hi,
mathias wrote:is it possible to testing Microsoft Dynamic AX with Ranorex?
Because there are different controllIDs for each new Application Instance and now windows names.
Typically all of the Microsoft application are testable with Ranorex. We have a few customers which test Dynamic AX with Ranorex and they had no problem so far.
You can set a weight Plug-In to filter out the ControlIDs.
Therefore please take a look to following link
http://www.ranorex.com/blog/eliminate-d ... norexpaths

Regards,
Peter
Ranorex Team

Re: Testing MS Dynamic AX with Ranorex?

Posted: Wed Aug 24, 2011 1:31 pm
by mathias
First of all, thanks for your fast answer.

I tried but I have some trouble with the plugin.

I did the steps from here: http://www.ranorex.com/blog/eliminate-d ... norexpaths

but i get an error message:

Code: Select all

Failed to load plugins from user directory. Failed to initialize plugin 'rxpathweights'. The given key was not present in the dictionary. 
Show/Hide Stacktrace
at Ranorex.Core.PluginManager.LoadDefaultPlugins(Boolean nonBlocking) at Ranorex.Core.PluginManager.LoadDefaultPluginsSuppressible(Boolean nonBlocking) at Ranorex.Core.ElementEngine.get_Instance() at Ranorex.Core.Testing.TestModuleRunner.RunStandalone(ITestModule module, String reportFilename, Boolean generateReport, String standaloneModuleName, CaseInsensitiveString guid)
That´s my ranorex spy view:
Image

On the attachment is the edit Ranorex.Plugin.RxPathWeights.config

What´s wrong?

Re: Testing MS Dynamic AX with Ranorex?

Posted: Thu Aug 25, 2011 10:52 am
by mathias
Support Team wrote:Hi,
mathias wrote:is it possible to testing Microsoft Dynamic AX with Ranorex?
Because there are different controllIDs for each new Application Instance and now windows names.
Typically all of the Microsoft application are testable with Ranorex. We have a few customers which test Dynamic AX with Ranorex and they had no problem so far.
You can set a weight Plug-In to filter out the ControlIDs.
Therefore please take a look to following link
http://www.ranorex.com/blog/eliminate-d ... norexpaths

Regards,
Peter
Ranorex Team
It´s not working. Either I am right or i didn´t understand the solution.

Again, I have dynamic controllIDs for example:

Code: Select all

/element[@controlid='132971048']/element[@controlid='15000']/element[@controlid='132952336']/element[@controlid='133039048']/element/element/element[@controlid='133058904']/element[@controlid='133060496']/element[@controlid='133062088']/element[@controlid='12314']
And all IDs are dynamic unless the last one '12314'.

Re: Testing MS Dynamic AX with Ranorex?

Posted: Thu Aug 25, 2011 4:48 pm
by Support Team
Hi,
And all IDs are dynamic unless the last one '12314'.
Are you sure, do you have tested it?
Can you send us two snapshot files, one before the restart of the AUT and one after it?
Following link will show you how to generate a snapshot file.

You do not longer need to write a "RxPathWeight config file", you can set the path weights directly in the Spy settings window. You only have to click on the "Edit Path Weights..." button, then you have to search for the right "Capability" and the right "Attribute". If you have selected the specific one you can set the weight to a lower value.

Regards,
Markus
Ranorex Support Team

Re: Testing MS Dynamic AX with Ranorex?

Posted: Fri Aug 26, 2011 9:53 am
by mathias
Support Team wrote:Hi,
And all IDs are dynamic unless the last one '12314'.
Are you sure, do you have tested it?
I started the application four times and the last controlid was the same like before.
Support Team wrote: You do not longer need to write a "RxPathWeight config file"...
Ok, different answers (see Peter above). So I delete the plugin now.

I think the mainproblem is, that I am not really know how to solve the problem with dynamics controllids.

It would be great if you describe the solution on one example.

So here my problem:
1) Ranorex have to find a menulink in MS Dynamics AX. Called: "Kursregulierung"
2) Ranorex have to do the invoke action "Press" on this menulink

Image

The controlids are dynamic and Ranorex Spy shows the fallowing path and informations:
Image

Image

Path:

Code: Select all

/form[@title~'^Microsoft\ Dynamics\ AX\ -\ E']/container/form[@controlid='65281']/element/element/element[@controlname='Submenu1' and @class='WindowsForms10.Window.8.app.0.33c0d9d' and @instance='6']/container/link[@accessiblename='LedgerExchAdj']

Maybe "live"-support is possible?


**UPDATE**
Now I tried this one: .//link[@accessiblevalue='Kursregulierung'] instead of the path above.
It works but I get a StackOverflow Error.

Code: Select all

LineageGlueRule 'msaa_child' caused OverflowException on Execute. Arithmetic operation resulted in an overflow.

Re: Testing MS Dynamic AX with Ranorex?

Posted: Fri Aug 26, 2011 1:26 pm
by Support Team
Hi,

Do you have tried to set the weight for the specific attribute?
I think the mainproblem is, that I am not really know how to solve the problem with dynamics controllids.
There are more possibilities, you can try to eliminate such Id's via the "Path Weight Editor" or you can manually change the RxPath in your repository file.
You have to use another attribute instead of the controllid, an attribute which is unique for the specific element and if there are no unique attributes you have to "ignore/delete" this element in the RxPath.
One possibility is to search for the specific element:

Code: Select all

/form[@title~'^Microsoft\ Dynamics\ AX\ -\ E']/container//link[@accessiblename='LedgerExchAdj']
but i think this would take too much time.

For a better understanding how to use and edit the RxPath please take a look at the following links:
http://www.ranorex.com/support/user-gui ... ditor.html
http://www.ranorex.com/blog/ranorexpath-tips-and-tricks
http://www.ranorex.com/blog/eliminate-d ... norexpaths

Regards,
Markus
Ranorex Support Team

Re: Testing MS Dynamic AX with Ranorex?

Posted: Mon Aug 29, 2011 1:16 pm
by mathias
ok, now I got some success, but one problem:

I do an invoke action and want to open a link:

Code: Select all

Report.Log(ReportLevel.Info, "Invoke Action", "Invoking Open( ) on item 'Kursregulierung'.", repo.KursregulierungInfo, new RecordItemIndex(0));
repo.Kursregulierung.Open();
Delay.Milliseconds(0);
It works, the new window opened but ranorex don´t do the next steps in the test. Ranorex searchbar stop after the searchtimeout. If I close the window then ranorex want to do the next steps...
What´s the problem?

Re: Testing MS Dynamic AX with Ranorex?

Posted: Wed Aug 31, 2011 7:57 am
by mathias
I need some help for my last posting please.

Re: Testing MS Dynamic AX with Ranorex?

Posted: Wed Aug 31, 2011 10:44 am
by Support Team
Hi,
Ranorex searchbar stop after the searchtimeout
Do you have checked your RxPath of the new window? It seems that Ranorex cannot find the specific elements, maybe somethings changed after the window appears.
Which actions should be performed, after the new window was opened?
Actions on the new window or on the old one?
Can you please send us at least a Snapshot or the whole AUT?
You can send it to our Support Email Address: [email protected]

Regards,
Markus
Ranorex Support Team