Hello,
I am currently evaluating ranorex, I have an issue that I have a pane that is created dynamically and the control ID are always different.
I would like to find the control based on the current Caption ( check pre capture ), Is that possible ?
Or is there another way ?
I tried that to play with the option but I could get it working ..
Thanks,
/Eric
Search control base on caption
-
- Posts: 25
- Joined: Tue May 05, 2015 11:25 am
Search control base on caption
You do not have the required permissions to view the files attached to this post.
Re: Search control base on caption
Hi,
Could you please post a Ranorex snapshot of the element in question? You can find how to create one here:
http://www.ranorex.com/support/user-gui ... files.html
Could you please post a Ranorex snapshot of the element in question? You can find how to create one here:
http://www.ranorex.com/support/user-gui ... files.html
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Posts: 25
- Joined: Tue May 05, 2015 11:25 am
Re: Search control base on caption
Hello,
I have included the file.
Not all control could be saved apparently.
You can check the control 5829 is is the same king of logic as the previous one I mentioned. The control look like this Thanks,
/Eric
I have included the file.
Not all control could be saved apparently.
You can check the control 5829 is is the same king of logic as the previous one I mentioned. The control look like this Thanks,
/Eric
You do not have the required permissions to view the files attached to this post.
-
- Posts: 25
- Joined: Tue May 05, 2015 11:25 am
Re: Search control base on caption
Hello,
It seems that the Id are always the same I have restarted three time the application and I always get Text'5829'.
why can't it be found when I play the recording ?
Thanks,
It seems that the Id are always the same I have restarted three time the application and I always get Text'5829'.
why can't it be found when I play the recording ?
Thanks,
Re: Search control base on caption
Hi,
I'm not sure I understand what exactly you want to achieve? You want to find the edit control based of the label control (let's say "Type Of Part")? If the control IDs are persistent, then you should be able to access that edit directly, using controlid 5829?
If the path fails during runtime, then there is most probably something different in the path/GUI? If the path is too complicated, with a lot of ID's, elements of even worse instance numbers, there is a high probability something will fail. I don't know anything about Solidworks, but I clearly remember from my previous job, that another Dassault Systemes application called Catia changes the control IDs a lot between each run
So I would suggest to forget about ControlIDs and use other attributes in your paths.
Try this simplified path:
If you are using Recording, you can make Ranorex to prefer another attribute over ControlID. Check this blog post about automating GUI with dynamic IDs:
http://www.ranorex.com/blog/automated-t ... ynamic-ids
I'm not sure I understand what exactly you want to achieve? You want to find the edit control based of the label control (let's say "Type Of Part")? If the control IDs are persistent, then you should be able to access that edit directly, using controlid 5829?
If the path fails during runtime, then there is most probably something different in the path/GUI? If the path is too complicated, with a lot of ID's, elements of even worse instance numbers, there is a high probability something will fail. I don't know anything about Solidworks, but I clearly remember from my previous job, that another Dassault Systemes application called Catia changes the control IDs a lot between each run

Try this simplified path:
Code: Select all
/form[@title~'^SOLIDWORKS']//form//text[@class='Edit' and @accessiblename='Type Of Part']
http://www.ranorex.com/blog/automated-t ... ynamic-ids
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Posts: 25
- Joined: Tue May 05, 2015 11:25 am
Re: Search control base on caption
Hello,
Thanks for your reply. You pointed me out to the problem.
The tab page in wich the control is created is having a new ID each time.
I unselected it and everything started to work
.
Thanks
Thanks for your reply. You pointed me out to the problem.
The tab page in wich the control is created is having a new ID each time.
I unselected it and everything started to work

Thanks
Re: Search control base on caption
Great! You are welcome 

Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration