Problems using Variables within Repository

Class library usage, coding and language questions.
anja
Posts: 67
Joined: Fri Nov 26, 2010 3:39 pm

Problems using Variables within Repository

Post by anja » Mon Jan 09, 2012 2:30 pm

Hi Ranorex Team,

I've got a problem using variables within the repository:

During test execution a new form (formA) appears with a variable name.
For this I created a variable within the repository:
formA: /form[@name = $variable]

Within a Code Module I set the value of the $variable to the expected value:
repo.variable = "value";

The verification if this form exists works correctly:
repo.formA.formAInfo.Exists()

Within the formA there is in the titlebar the cross to close this window.
If I try to click the Close-Button, I got following error message:
Failed to find item Repository.FormA.TitleBar.ButtonClose'. The folder Repository.FormA.TitleBar' was not found. No element found for path 'titlebar[@automationid='TitleBar']' within 30s.
If I set the expected value for the actual testcase directly within the repository (no use of variable within the repository, it works correctly.

Why is it not possible to access the close-Button? It seams possible to access the form, so why not the button?

I hope you can help me quickly...

Thanks in advance

Anja

P.S: I'm currently working with Ranorex Studio 3.1.2.14812

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Problems using Variables within Repository

Post by Support Team » Mon Jan 09, 2012 5:40 pm

Hi,

I tried to reproduce the issue but it is running as expected. Would it be possible to post us your repository to check it? Even better would be a small sample application with a Ranorex Project.

Thanks in advance.

Regards,
Peter
Ranorex Team

anja
Posts: 67
Joined: Fri Nov 26, 2010 3:39 pm

Re: Problems using Variables within Repository

Post by anja » Tue Jan 10, 2012 7:51 am

Hi,

it is not possible for me to provide a sample application... I've attached a small repository containing only the form, where I got the problems... Additionally I attached the code module with additional comments for you, where my problems occure... I hope this will help you to analyse this problem...

Thank you in advance for your help.

Anja
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Problems using Variables within Repository

Post by Support Team » Thu Jan 12, 2012 9:26 am

Hi,

We found the issue and it will be fixed in Ranorex 3.2.1. This release should be available at the end of January.

Regards,
Peter
Ranorex Team