Excel Plugin - Searching item

Ranorex Spy, Recorder, and Studio.
jamesslater
Posts: 10
Joined: Mon Feb 20, 2012 3:07 pm

Excel Plugin - Searching item

Post by jamesslater » Mon Feb 20, 2012 4:16 pm

Hi There

I am current evaluating Ranorex to see if it will work with our software. I'm currently testing an excel plugin. The plugin is mostly interacted with via pop up windows. The recording works fine, and the Spy can successfully highlight the elements in the pop up form.

The problem is, when playing back the recording it hangs on every step with "searching item ...." message. After about 45 seconds it eventually finds the item and continues.

Any ideas why it takes so long to find the elements, when the spy can highlight them straight away?

I have tried adding big delays between each step, which doesn't help.

Thanks

jamesslater
Posts: 10
Joined: Mon Feb 20, 2012 3:07 pm

Re: Excel Plugin - Searching item

Post by jamesslater » Mon Feb 20, 2012 5:41 pm

I have attached the snapshot file for one of the pop up forms.

One difference is, when looking in spy, the path is :
/form[@controlname='ConnectionListing']/button[@controlname='btnConnect']

but the recorder has recorded the following path in the element repository :
/form[@processname='EXCEL']/button[@controlname='btnConnect']

But selecting highlight from ether the element browser or the repository still highlights the correct button fine, its just when playing the recording the problem occurs.
Attachments
exceltest.rxsnp
(107.79 KiB) Downloaded 181 times

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

Re: Excel Plugin - Searching item

Post by Support Team » Tue Feb 21, 2012 9:10 am

Hi,

it looks to me like you are getting a
"Item '...' could be found using its absolute path, but not by using the repository structure"-error.
That's because you might have two opened dialogs opened both fitting the RanoreXPath "/form[@processname='EXCEL']", the Excel worksheet and your connection dialog.
If that's the case, you have to add a separate app Folder to your repository with the RanoreXPath returned from Ranorex Spy:
/form[@controlname='ConnectionListing']

Now you can add the button "/button[@controlname='btnConnect']" to this app folder.
With making a click action on the button in the newly created app folder you should not run into any issues.

For further details about adapting the repository please have a look at following chapter of our user guide:
UI Mapping with Ranorex Repository

Regards,
Tobias
Ranorex Support Team
.
Image

jamesslater
Posts: 10
Joined: Mon Feb 20, 2012 3:07 pm

Re: Excel Plugin - Searching item

Post by jamesslater » Tue Feb 21, 2012 10:30 am

Thank you for you reply, yes manually creating the app folder and moving the elements into the new folder fixed the problem.

As majority of the test interaction is going to occur in the popup windows, is there a way to configure the recorder to use the correct path for the window, as it will be very time consuming to manually have to move all the elements into a different folder after each recording.

Why does the recorder pick up a different path to Spy?

Thanks

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

Re: Excel Plugin - Searching item

Post by Support Team » Wed Feb 22, 2012 2:34 pm

jamesslater wrote:As majority of the test interaction is going to occur in the popup windows, is there a way to configure the recorder to use the correct path for the window, as it will be very time consuming to manually have to move all the elements into a different folder after each recording.
Basically you can add a RanoreXPath Weight rule for control->controlname as described in following blog post:
Eliminate dynamic attributes in generated RanoreXPaths

By setting a higher value, the attribute will be taken automatically to identify the control.

Regards,
Tobias
Ranorex Support Team
.
Image

jamesslater
Posts: 10
Joined: Mon Feb 20, 2012 3:07 pm

Re: Excel Plugin - Searching item

Post by jamesslater » Wed Feb 22, 2012 7:15 pm

Thanks Tobias, I have increases the weight for "forms" and "title" which has fixed the problem.

It seems that Spy is much better at picking a good path to a element than the recorder, I'm sure there is a technical reason why the recorder cannot pick the same path.

There also appears to be a bit of bug in Ranorex Studio when making changes to path weights requires you to save, close, and re-open a recording windows before the changes take effect.

All sorted, thank you again for your help. I'm now geting the hang of Ranerex.

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

Re: Excel Plugin - Searching item

Post by Support Team » Thu Feb 23, 2012 12:40 pm

Hi,
jamesslater wrote:There also appears to be a bit of bug in Ranorex Studio when making changes to path weights requires you to save, close, and re-open a recording windows before the changes take effect.
This is because the Ranorex Studio loads the configuration at the startup. Therefore you have to restart your Studio. If you install addons for Visual Studio you have to restart the studio too, because you have to load the new config.

Regards,
Peter
Ranorex Team
.
Image