Testing MS Dynamic AX with Ranorex?

Ask general questions here.
mathias
Posts: 10
Joined: Fri Aug 05, 2011 7:39 am

Testing MS Dynamic AX with Ranorex?

Post by mathias » Tue Aug 23, 2011 10:46 am

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Testing MS Dynamic AX with Ranorex?

Post by Support Team » Tue Aug 23, 2011 12:58 pm

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
.
Image

mathias
Posts: 10
Joined: Fri Aug 05, 2011 7:39 am

Re: Testing MS Dynamic AX with Ranorex?

Post by mathias » Wed Aug 24, 2011 1:31 pm

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?
Attachments
Ranorex.Plugin.RxPathWeights.rar
(638 Bytes) Downloaded 280 times

mathias
Posts: 10
Joined: Fri Aug 05, 2011 7:39 am

Re: Testing MS Dynamic AX with Ranorex?

Post by mathias » Thu Aug 25, 2011 10:52 am

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'.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Testing MS Dynamic AX with Ranorex?

Post by Support Team » Thu Aug 25, 2011 4:48 pm

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
.
Image

mathias
Posts: 10
Joined: Fri Aug 05, 2011 7:39 am

Re: Testing MS Dynamic AX with Ranorex?

Post by mathias » Fri Aug 26, 2011 9:53 am

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.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Testing MS Dynamic AX with Ranorex?

Post by Support Team » Fri Aug 26, 2011 1:26 pm

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
.
Image

mathias
Posts: 10
Joined: Fri Aug 05, 2011 7:39 am

Re: Testing MS Dynamic AX with Ranorex?

Post by mathias » Mon Aug 29, 2011 1:16 pm

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?

mathias
Posts: 10
Joined: Fri Aug 05, 2011 7:39 am

Re: Testing MS Dynamic AX with Ranorex?

Post by mathias » Wed Aug 31, 2011 7:57 am

I need some help for my last posting please.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Testing MS Dynamic AX with Ranorex?

Post by Support Team » Wed Aug 31, 2011 10:44 am

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
.
Image