Ranorex struggles to find elements in a table
Ranorex struggles to find elements in a table
Hi all,
I have a problem with Ranorex failing to detect cells in a table. It just detects the container that the table is in, but nothing inside. The interesting thing is that sometimes Ranorex succeeds and I can see the records inside the table, not as rows and cells, but as elements, which is fine, but I can't seem to find a pattern of why and when it finds the content inside. I am using Ranorex Studio v9.2.1.
I managed to make snapshots of both cases and I am attaching them below.
If anyone has some information about this issue, please share. Thanks in advance.
Regards,
Bobby
I have a problem with Ranorex failing to detect cells in a table. It just detects the container that the table is in, but nothing inside. The interesting thing is that sometimes Ranorex succeeds and I can see the records inside the table, not as rows and cells, but as elements, which is fine, but I can't seem to find a pattern of why and when it finds the content inside. I am using Ranorex Studio v9.2.1.
I managed to make snapshots of both cases and I am attaching them below.
If anyone has some information about this issue, please share. Thanks in advance.
Regards,
Bobby
You do not have the required permissions to view the files attached to this post.
Re: Ranorex struggles to find elements in a table
Hi,
The answer why the table elements are not recognizable are right in the snapshot you posted (the one which shows incorrect state)... Just follow the instructions from the warning. And ideally, update Ranorex with most recent 9.3.2. Version 9.2.1 is not obsolete and no longer supported and there were number of fixes introduced between 9.2.1 and 9.3.2.
The answer why the table elements are not recognizable are right in the snapshot you posted (the one which shows incorrect state)... Just follow the instructions from the warning. And ideally, update Ranorex with most recent 9.3.2. Version 9.2.1 is not obsolete and no longer supported and there were number of fixes introduced between 9.2.1 and 9.3.2.
You do not have the required permissions to view the files attached to this post.
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
Re: Ranorex struggles to find elements in a table
Hi odklizec,
Thanks for the fast response!
Well, I couldn't get that warning window to appear, but I had tried all of the options of the WPF plugin. And when set to WpfImprovedOnly, indeed Ranorex detects every element I tried so far. The problem is that the element tree changes as well and the paths to the elements I already have don't work any more, which is not good, because the repository is quite large. So, is there a way I can get Ranorex to work with the UiaOnly option, because, as you saw, sometimes it detects the elements, but it is not stable? Thanks in advance.
Regards,
Bobby
Thanks for the fast response!
Well, I couldn't get that warning window to appear, but I had tried all of the options of the WPF plugin. And when set to WpfImprovedOnly, indeed Ranorex detects every element I tried so far. The problem is that the element tree changes as well and the paths to the elements I already have don't work any more, which is not good, because the repository is quite large. So, is there a way I can get Ranorex to work with the UiaOnly option, because, as you saw, sometimes it detects the elements, but it is not stable? Thanks in advance.
Regards,
Bobby
Re: Ranorex struggles to find elements in a table
Hi,
Apparently, the table in question simple requires WPFImproved and it was only a pure luck that it worked with UiaOnly option? The only thing that you can probably do is to switch the WPF settings from code to WPFImproved and back to UiaOnly (before and after accessing the table).
Check this post about how to switch WPF plugin from code:
https://www.ranorex.com/forum/live-trac ... 1-s15.html
Apparently, the table in question simple requires WPFImproved and it was only a pure luck that it worked with UiaOnly option? The only thing that you can probably do is to switch the WPF settings from code to WPFImproved and back to UiaOnly (before and after accessing the table).
Check this post about how to switch WPF plugin from code:
https://www.ranorex.com/forum/live-trac ... 1-s15.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
Re: Ranorex struggles to find elements in a table
Hi again,
Thanks for the tip, it works when I switch the settings. But, probably I should have checked it earlier, Ranorex detects the cell, but when I look at the elements' attributes, there is no text. I can't find an attribute that contains the cells' content. Which is strange and frustrating, because I checked in some other tables and I can see the text attribute, but in this particular one... I am attaching a snapshot, if you have any ideas. Thanks again.
Thanks for the tip, it works when I switch the settings. But, probably I should have checked it earlier, Ranorex detects the cell, but when I look at the elements' attributes, there is no text. I can't find an attribute that contains the cells' content. Which is strange and frustrating, because I checked in some other tables and I can see the text attribute, but in this particular one... I am attaching a snapshot, if you have any ideas. Thanks again.
You do not have the required permissions to view the files attached to this post.
Re: Ranorex struggles to find elements in a table
Hello Bobby,
You mentioned you were successful with other tables within your application, I'm curious as to how they compare to this one. Would you be able to provide a snapshot of a working table in your AUT? I also don't think there was anything specific towards WPF in Ranorex 9.3 but I do recommend updating to the latest version as well.
Regards,
You mentioned you were successful with other tables within your application, I'm curious as to how they compare to this one. Would you be able to provide a snapshot of a working table in your AUT? I also don't think there was anything specific towards WPF in Ranorex 9.3 but I do recommend updating to the latest version as well.
Regards,
Re: Ranorex struggles to find elements in a table
Hi,
There are two possibilities...
A) Ranorex implementation of WPF is not optimized with this particular DevExpress Table control
B) This DevExpress Table control is not implemented properly and therefore, Ranorex cannot read its values.
As for A), have you tried to enable/switch WPF options in Ranorex settings (Plugins tab)?
In any case, you should contact Ranorex support and request a remote session so they can see and analyze the problem directly on your machine. I'm afraid, they will most probably need access to your app or a sample app, featuring this particular DevExpress table control.
BTW, the only other thing which you might try, is to enable GDI Capture for this table. But as mentioned many times before, the results from GDI Capture are pretty hard to work with, especially with complex elements like tables. So while it might return you some useful values, it may be a nightmare to work with these values
There are two possibilities...
A) Ranorex implementation of WPF is not optimized with this particular DevExpress Table control
B) This DevExpress Table control is not implemented properly and therefore, Ranorex cannot read its values.
As for A), have you tried to enable/switch WPF options in Ranorex settings (Plugins tab)?
In any case, you should contact Ranorex support and request a remote session so they can see and analyze the problem directly on your machine. I'm afraid, they will most probably need access to your app or a sample app, featuring this particular DevExpress table control.
BTW, the only other thing which you might try, is to enable GDI Capture for this table. But as mentioned many times before, the results from GDI Capture are pretty hard to work with, especially with complex elements like tables. So while it might return you some useful values, it may be a nightmare to work with these values
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
Re: Ranorex struggles to find elements in a table
Hi all,
mayo - I tried two other tables, but couldn't get the cell content either. I can't remember, in which table I could get it, but I'll keep trying and I'll upload a snapshot, when I do get it.
odklizec - I use the WpfImprovedOnly option when I'm trying to get the cells' value, otherwise, using UiaOnly Ranorex can't detect the cell at all. In relation to that, I have another question:
By using this dynamic action of the element, I am able to extract the cells' content. How can I use this dynamic action in my code? I read in another thread that I can do it by using the invoke action method and then convert it to code, but I can't find these options there...
mayo - I tried two other tables, but couldn't get the cell content either. I can't remember, in which table I could get it, but I'll keep trying and I'll upload a snapshot, when I do get it.
odklizec - I use the WpfImprovedOnly option when I'm trying to get the cells' value, otherwise, using UiaOnly Ranorex can't detect the cell at all. In relation to that, I have another question:
By using this dynamic action of the element, I am able to extract the cells' content. How can I use this dynamic action in my code? I read in another thread that I can do it by using the invoke action method and then convert it to code, but I can't find these options there...
You do not have the required permissions to view the files attached to this post.
Re: Ranorex struggles to find elements in a table
Hi,
Just drag&drop the repo element representing cell in question to recording table. Once you release the mouse, there should appear a context menu with list of available actions. What you are looking for is "Invoke Action". Then if you right click the action in recording table, you can convert it to user code.
Just drag&drop the repo element representing cell in question to recording table. Once you release the mouse, there should appear a context menu with list of available actions. What you are looking for is "Invoke Action". Then if you right click the action in recording table, you can convert it to user code.
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
Re: Ranorex struggles to find elements in a table
Hi,
Yes, yes, I do that, but I don't have the "GetDisplayText" option there. Here is a screenshot:
Yes, yes, I do that, but I don't have the "GetDisplayText" option there. Here is a screenshot:
You do not have the required permissions to view the files attached to this post.
Re: Ranorex struggles to find elements in a table
Hi,
Unfortunately, if the command is not there, it's most probably not implemented in the UI. It seems that you are out of luck here? Have you tried GDI Capture apporach?
I think your best option is to contact Ranorex support. But I don't think there is a quick or immediate solution for this problem.
Unfortunately, if the command is not there, it's most probably not implemented in the UI. It seems that you are out of luck here? Have you tried GDI Capture apporach?
I think your best option is to contact Ranorex support. But I don't think there is a quick or immediate solution for this problem.
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
Re: Ranorex struggles to find elements in a table
Hi,
Tough luck for me then.
As far as for GDI, I am not sure how it works exactly. I read the user guide about that, but couldn't quite get it to work...
Tough luck for me then.
As far as for GDI, I am not sure how it works exactly. I read the user guide about that, but couldn't quite get it to work...
Re: Ranorex struggles to find elements in a table
Hi,
Well, GDI Capture is not always helpful, but usually, it returns number of RAWTexts from pointed UI elements. Have you tried to add Table element to GDI Capture list? Once its added and Spy is refreshed, there should appear list of RAWTexts, in which you may find the cell you are looking for.
Well, GDI Capture is not always helpful, but usually, it returns number of RAWTexts from pointed UI elements. Have you tried to add Table element to GDI Capture list? Once its added and Spy is refreshed, there should appear list of RAWTexts, in which you may find the cell you are looking for.
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
Re: Ranorex struggles to find elements in a table
Hi,
I try to add the table element to the GDI capture list, like it is explained in the user guide, but I don't have that option.
I try to add the table element to the GDI capture list, like it is explained in the user guide, but I don't have that option.
You do not have the required permissions to view the files attached to this post.
Re: Ranorex struggles to find elements in a table
Hi,
In this case, examine all parent containers. I guess there will be such option in Element MasterData...?
In this case, examine all parent containers. I guess there will be such option in Element MasterData...?
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