GroupBox sometimes container sometimes element : Object Identification and Technologies

GroupBox sometimes container sometimes element

Technology specific object identification, supported applications, web technologies, and 3rd party controls.

GroupBox sometimes container sometimes element

Postby WajdaW » Mon Oct 24, 2011 1:18 pm

I have some Excel plugin and Windows Forms dialog for configuration. Problem is that when I run excel and click on my configuration, group boxes in configuration form sometimes have RXpath
/element[@controlname='groupBoxServerSettings'] and sometimes /container[@controlname='groupBoxServerSettings'] so my RXpath cannot find them always.
Also all my controls in groupBox change path. For example. My textBox change paths into this two values:
text[@controlname='textBoxBaseUrl']/text and
element[@controlname='textBoxBaseUrl']/text

Is there a way to have Rxpath written in that way so it can detect any of those elements like:
(text | element)[@controlname='textBoxBaseUrl']/text and for groupBox

(element | container)[@controlname='groupBoxServerSettings']
Or to use some type that is more generic that both of these types so it will fit RXpath always.
Or can I specify somehow in my GUI part that to create always only container and text elements.
How to solve this?

Regards,

Vladimir Vajda
WajdaW
 
Posts: 72
Joined: Wed Jan 05, 2011 7:45 pm

Re: GroupBox sometimes container sometimes element

Postby Support Team » Mon Oct 24, 2011 2:54 pm

Hi,
WajdaW wrote:Or to use some type that is more generic that both of these types so it will fit RXpath always.
Or can I specify somehow in my GUI part that to create always only container and text elements.
How to solve this

Would it be possible to post us two Ranorex Snapshots of these two cases? It seems to be a .Net Framework issue.
Are you using different .Net Framework version for your application under test?
I guess the UI element identification capabilities for this control are limited. Therefore please take a look to following link http://www.ranorex.com/support/user-gui ... html#c3250

Regards,
Peter
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4843
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: GroupBox sometimes container sometimes element

Postby WajdaW » Tue Oct 25, 2011 12:16 pm

"Are you using different .Net Framework version for your application under test? "
I haven't quite understood this. I'm using .NET framework 4 in all of my projects (development and test)

Here are snapshots.
Just forgot to say, I don't use native windows forms controls for check boxes, comboboxes and buttons. I have made my classes which extends win forms classes. Maybe that is a problem.
Maybe I need to override some property or method of these win forms classes for this to work properly.

Take a look at my snapshots.
Attachments
Snapshot2.rxsnp
(309.08 KiB) Downloaded 10 times
Snapshot1.rxsnp
(297.13 KiB) Downloaded 11 times
WajdaW
 
Posts: 72
Joined: Wed Jan 05, 2011 7:45 pm

Re: GroupBox sometimes container sometimes element

Postby Support Team » Tue Oct 25, 2011 1:26 pm

Hi,

Thank you for the snapshots. I saw you are currently working on Ranorex 3.0.2. I would suggest you to update to Ranorex 3.0.5 or if it's possible to Ranorex 3.1.1, because we fixed a lot of small issues for .Net 4.0 applications.

Regards,
Peter
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4843
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: GroupBox sometimes container sometimes element

Postby WajdaW » Thu Oct 27, 2011 2:20 pm

We have upgraded to Ranorex 3.1.1 but now we have problem with licence. Is it possible that our licence doesn't suites this version of Ranorex?

"I would suggest you to update to Ranorex 3.0.5 or if it's possible to Ranorex 3.1.1"
Why have you mentioned this part? Is the Ranorex 3.0.5 the latest version to which we can upgrade with this licence?
WajdaW
 
Posts: 72
Joined: Wed Jan 05, 2011 7:45 pm

Re: GroupBox sometimes container sometimes element

Postby Support Team » Thu Oct 27, 2011 2:23 pm

Hi,
WajdaW wrote:Why have you mentioned this part? Is the Ranorex 3.0.5 the latest version to which we can upgrade with this licence?

This depends on your subscription. If you don't have a valid subscription you cannot install Ranorex 3.1.1. Therefore I told you if "it is possible". But it was my fault to not tell you that you need a valid subscription. Sorry for that. Therefore please uninstall this version and install Ranorex 3.0.5.

Thank you.

Regards,
Peter
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4843
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: GroupBox sometimes container sometimes element

Postby WajdaW » Thu Oct 27, 2011 4:27 pm

Ok, we just gained new licence that is compatibile with 3.1.1 Ranorex. Thanks for information about that. I'll try later if this version fixes my first problem with object identification.

Regards,
Vladimir Vajda
WajdaW
 
Posts: 72
Joined: Wed Jan 05, 2011 7:45 pm

Re: GroupBox sometimes container sometimes element

Postby WajdaW » Fri Oct 28, 2011 10:51 am

I installed and tried new Ranorex 3.1.1 but problem is still here. I provided snapshots of these two cases in attachment.
Just to say, when I start Excel normally I get snapshot where all controls are elements. But when I start excel using nunit test runner button controls are buttons and groupbox controls are containers.
I came to think that maybe some security issue is problem. I don't know, just guessing.

So here are snapshots, suggest what I can do. Is there a way to specify my RxPath that way to be able to find item whether it's path is container[xx] or element[xxx]?
Attachments
Snapshot2.rxsnp
(162.14 KiB) Downloaded 11 times
Snapshot1.rxsnp
(160.21 KiB) Downloaded 11 times
WajdaW
 
Posts: 72
Joined: Wed Jan 05, 2011 7:45 pm

Re: GroupBox sometimes container sometimes element

Postby Support Team » Fri Oct 28, 2011 11:22 am

Hi,
WajdaW wrote:I came to think that maybe some security issue is problem. I don't know, just guessing.

This could be. Did you try to start your Excel application as administrator?
Do you know if UAC is enabled on your Windows 7 machine?

Regards,
Peter
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4843
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: GroupBox sometimes container sometimes element

Postby WajdaW » Fri Oct 28, 2011 11:37 am

I am administrator on that machine. UAC is turned off.
WajdaW
 
Posts: 72
Joined: Wed Jan 05, 2011 7:45 pm

Re: GroupBox sometimes container sometimes element

Postby WajdaW » Fri Oct 28, 2011 11:40 am

Is there a way to somehow specify role for my win forms components. I figured out that if a role of control is unknown it becomes element which is default. Can I specify in my win form code control role for this case?
Will this fix the problem?
WajdaW
 
Posts: 72
Joined: Wed Jan 05, 2011 7:45 pm

Re: GroupBox sometimes container sometimes element

Postby Support Team » Fri Oct 28, 2011 11:52 am

Hi,

Please would you add following lines to your nunit app config.
<configuration>  
  <startup useLegacyV2RuntimeActivationPolicy="true">  
    <supportedRuntime version="v4.0"/>  
    <supportedRuntime version="v2.0.50727"/>  
  </startup>  
</configuration>

Just change the one of your nunit executable.

Regards,
Peter
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4843
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: GroupBox sometimes container sometimes element

Postby WajdaW » Wed Nov 02, 2011 2:24 pm

Thanks Peter. That solved the problem. :)
WajdaW
 
Posts: 72
Joined: Wed Jan 05, 2011 7:45 pm

Re: GroupBox sometimes container sometimes element

Postby binonline » Fri May 25, 2012 1:25 pm

I have now a very similar problem:
On one PC I could run the TestSuite with the Application under Test successfully. The I Installed RANOREX with a trial version on another machine, installed the same Application under Test and used the same TesSuite, which resides on a shared drive - so same app.config file.

on working PC:
RANOREX: 3.2.3.16825
.NET Runtime Verison: 4.0.30319.269
Working Application Address.JPG
Working Address on previous PC
Working Application Address.JPG (36.21 KiB) Viewed 6 times


on new (not worrking) PC:
RANOREX: 3.2.3.16825
.NET Runtime Verison: 4.0.30319.269
New Application Address.JPG
Not working since container are elements in address
New Application Address.JPG (29.97 KiB) Viewed 6 times


How to asure, that it's always referencing per container not elements :?:

Thx, Robert
binonline
 
Posts: 4
Joined: Thu Apr 19, 2012 5:12 pm


Return to Object Identification and Technologies

Who is online

Users browsing this forum: No registered users and 0 guests

cron