windev objects
windev objects
Hi everybody,
i'm working with windev in my job, and i'm actually trying automations with a 30 days version of ranorex.
It working very well, but i can't access to some specifics objects like a table or a listbox.
For example, i have a table with 2 lines. But when i'm trying to do this "Int32 nbitems = repo.MiseAJourDunePersonne.ListBox.Items.Count;" the function return 4 items containing each one the empty value.
How can i access to the value of each item of the listbox please ?
Please, help me.
Thx
i'm working with windev in my job, and i'm actually trying automations with a 30 days version of ranorex.
It working very well, but i can't access to some specifics objects like a table or a listbox.
For example, i have a table with 2 lines. But when i'm trying to do this "Int32 nbitems = repo.MiseAJourDunePersonne.ListBox.Items.Count;" the function return 4 items containing each one the empty value.
How can i access to the value of each item of the listbox please ?
Please, help me.
Thx
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: windev objects
Hi yfrindel,
Can you please give us more information about your application. Is it possible to give us access to your application or to post at least a Ranorex Snapshot file.
Please read the section "Creating Ranorex Snapshot Files" in our user guide in order to get a detailed description how to create a Ranorex Snapshot file.
If you don't want to post your snapshot in the forum please send it to [email protected]
Regards,
Bernhard
Can you please give us more information about your application. Is it possible to give us access to your application or to post at least a Ranorex Snapshot file.
Please read the section "Creating Ranorex Snapshot Files" in our user guide in order to get a detailed description how to create a Ranorex Snapshot file.
If you don't want to post your snapshot in the forum please send it to [email protected]
Regards,
Bernhard
Re: windev objects
Hi,
and thx a lot for your answer.
You can find on attachment the snapshot file you needed.
It will be very well if you have any solution.
Best regards
and thx a lot for your answer.
You can find on attachment the snapshot file you needed.
It will be very well if you have any solution.
Best regards

You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: windev objects
Hello yfrindel,
Thank you for the snapshot file. It seems that the lines within the table cannot be found. Additionally the control itself seems not to be a table.
I suggest to add the class name to the GDI capture list as shown in the image below.
I hope the elements can be found after doing this.
Regards,
Bernhard
Thank you for the snapshot file. It seems that the lines within the table cannot be found. Additionally the control itself seems not to be a table.
I suggest to add the class name to the GDI capture list as shown in the image below.
I hope the elements can be found after doing this.
Regards,
Bernhard
You do not have the required permissions to view the files attached to this post.
Re: windev objects
Hi Bernhard,
and thank u again for your help.
I tried your advice, and you can see on the screenshot that i can see now (in the ranorex spy) the RawText elements corresponding to the titles and the rows of my table.
It's fine, but how can i get this elements directly by programmation ?
When i try "repo.ValeurDeRachatPerformancesCapital1.ListBox." i don't find any RawText elements.
Can u help me ? I feel that the solution is not so far !
Yannick
and thank u again for your help.
I tried your advice, and you can see on the screenshot that i can see now (in the ranorex spy) the RawText elements corresponding to the titles and the rows of my table.
It's fine, but how can i get this elements directly by programmation ?
When i try "repo.ValeurDeRachatPerformancesCapital1.ListBox." i don't find any RawText elements.
Can u help me ? I feel that the solution is not so far !

Yannick
You do not have the required permissions to view the files attached to this post.
Re: windev objects
i have made a new project with windev. Just a simply window with the mains components.
I tried to fill each component with ranorex, but i have some problems with the listbox and the table.
Do u have some advices for me ?
you can find the project on the attachment of this post.
Thx
I tried to fill each component with ranorex, but i have some problems with the listbox and the table.
Do u have some advices for me ?
you can find the project on the attachment of this post.
Thx
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: windev objects
Hello yfrindel,
Thank you for the application.
Did you add the rawtext elements to the repository?
If they are there you should also be able to access them.
Please open the Ranorex Spy within Ranorex Studio or track the elements directly using the Track button in the repository. or It should be possible to access the element using the following line.
Bernhard
Thank you for the application.
Did you add the rawtext elements to the repository?
If they are there you should also be able to access them.
Please open the Ranorex Spy within Ranorex Studio or track the elements directly using the Track button in the repository. or It should be possible to access the element using the following line.
var valeur = repo.RanorexTest.Valeur;Regards,
Bernhard
You do not have the required permissions to view the files attached to this post.
Re: windev objects
thx for your response.
It works with the command repo.RanorexTest1.Valeur.RawTextValue, but how can i change the value ?
The RanorexTest1.Valeur.RawTextValue is read only !
And how can i find the number of rows in my table ? (like the Items.count function).
The function ListBox.Items.Count() don't return the right number of rows in my table.
And is it possible to work with a dynamic table ? for example, Is it possible to go through each array element ?
And how can i make a list of all rawtext in the form ?
best regards
It works with the command repo.RanorexTest1.Valeur.RawTextValue, but how can i change the value ?
The RanorexTest1.Valeur.RawTextValue is read only !
And how can i find the number of rows in my table ? (like the Items.count function).
The function ListBox.Items.Count() don't return the right number of rows in my table.
And is it possible to work with a dynamic table ? for example, Is it possible to go through each array element ?
And how can i make a list of all rawtext in the form ?
best regards
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: windev objects
Hello yfrindel,
I am glad that it works.
May I ask why do you want to change the value?
I would suggest to use a mouse/keyboard action in order to change the value in your data table. If you want to set the value using code, you will need to implement an interface in your application directly. I would not recommend doing that.
The method ListBox.Items.Count() doesn't give you the correct row count because the elements within your ListBox are RawText elements and don't represent the rows only.
A workaround would be to use the last RawText element and check the Row attribute. This should give you the value of the row count.
For example:
Regards,
Bernhard
I am glad that it works.
May I ask why do you want to change the value?
I would suggest to use a mouse/keyboard action in order to change the value in your data table. If you want to set the value using code, you will need to implement an interface in your application directly. I would not recommend doing that.
The method ListBox.Items.Count() doesn't give you the correct row count because the elements within your ListBox are RawText elements and don't represent the rows only.
A workaround would be to use the last RawText element and check the Row attribute. This should give you the value of the row count.
For example:
/form[@title='Ranorex test']/list[@instance='0']/rawtext[-1]The following path should give you a list of all RawText elements within your table.
/form[@title='Ranorex test']/list[@instance='0']/rawtextI hope this will help you.
Regards,
Bernhard
Re: windev objects
ok thx, but what is the correct syntax please ?
i tried List<Ranorex.RawText> lr = @"/form[@title='Ranorex test']/list[@instance='0']/rawtext"; but it doesn't work...
i tried also this :
IList<Ranorex.RawText> RawTextL = Host.Local.Find<Ranorex.RawText>("/form[@title='Ranorex test']/list[@instance='0']/rawtext",500);
foreach (Ranorex.RawText rt in RawTextL)
{
Report.Log(ReportLevel.Info,rt.RawTextValue);
}
but the IList is empty
In ranorex spy it seems to be good (like in the snapshot)
help...
i tried List<Ranorex.RawText> lr = @"/form[@title='Ranorex test']/list[@instance='0']/rawtext"; but it doesn't work...
i tried also this :
IList<Ranorex.RawText> RawTextL = Host.Local.Find<Ranorex.RawText>("/form[@title='Ranorex test']/list[@instance='0']/rawtext",500);
foreach (Ranorex.RawText rt in RawTextL)
{
Report.Log(ReportLevel.Info,rt.RawTextValue);
}
but the IList is empty
In ranorex spy it seems to be good (like in the snapshot)
help...
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: windev objects
Hi yfrindel,
Please try the following code.
Regards,
Bernhard
Please try the following code.
RawText lastRow = @"/form[@title='Ranorex test']/list[@instance='0']/rawtext[@row~'^*'][-1]"; int rowCount = lastRow.Row; Report.Info("Row Count: " + rowCount.ToString());This should give you exactly the row count
Regards,
Bernhard
Re: windev objects
Thx for your help but, unfortunatly, the license has expired today.
Is it possible to have 30 more days for evaluating your software please ?
Is it possible to have 30 more days for evaluating your software please ?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: windev objects
Hi yfrindel,
Please contact our sales team ([email protected]) if you need more time in order to evaluate Ranorex.
Regards,
Bernhard
Please contact our sales team ([email protected]) if you need more time in order to evaluate Ranorex.
Regards,
Bernhard
Re: windev objects
Hi how are you? ^^
I have a small problem with the object of type "listbox".
When I record a test scenario, Ranorex stores the double-click mouse position in the listbox. But when the elements change in this listbox (by adding a new value in the top of the list, for example), mouse double-click does not occur on the correct item when i played the scenario.
In the application I had sent you, the listbox object appears at the top right of the window. I loaded it with 4 values.
How (with the Actions window of ranorex or through code) to define an action on one of these, and be sure therefore that there will always be that on which the action (focus, click, double click .. .) will be executed ? (eg stupidly click on "element3").
thank you in advance,
Yannick
I have a small problem with the object of type "listbox".
When I record a test scenario, Ranorex stores the double-click mouse position in the listbox. But when the elements change in this listbox (by adding a new value in the top of the list, for example), mouse double-click does not occur on the correct item when i played the scenario.
In the application I had sent you, the listbox object appears at the top right of the window. I loaded it with 4 values.
How (with the Actions window of ranorex or through code) to define an action on one of these, and be sure therefore that there will always be that on which the action (focus, click, double click .. .) will be executed ? (eg stupidly click on "element3").
thank you in advance,
Yannick
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: windev objects
Hi Yannick,
I would suggest to use the invoke action "Select()". Simply drag&drop your list item to the action table and choose "Invoke Action -> Select()".
Regards,
Robert
I would suggest to use the invoke action "Select()". Simply drag&drop your list item to the action table and choose "Invoke Action -> Select()".
Regards,
Robert
You do not have the required permissions to view the files attached to this post.