Hi Ranorex,
Is there any way to get all the disabled tags present on the page based on the main TableTag of the page.
Let me give an example,
If we want all td's present on the page m using this code:
TableTag searchTable = (Ranorex.TableTag)objScrptVarBO.pageObj.PBGetElement(tableName);
foreach(Ranorex.TdTag tags in searchTable.FindDescendants<Ranorex.TdTag>())
{
if(dc.ColumnName == tags.InnerText)
Report.Log(ReportLevel.Info,tags.InnerText);
}
Like this way,Can we get all the disabled tags beased on the tabletag...?
How to get the disabled tags based on the main tabletag
Re: How to get the disabled tags based on the main tabletag
Hi,
Could you please upload Ranorex snapshot of the table in question?
Could you please upload Ranorex snapshot of the table in question?
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: How to get the disabled tags based on the main tabletag
In this image select tag that i rounded is a disable tag u can see the iamge on right down side.
Aim is to get the disabled tags in that table what ever tag type it may be.
You do not have the required permissions to view the files attached to this post.
Re: How to get the disabled tags based on the main tabletag
Hi,
Thanks for the screenshot, but what I asked for is Ranorex Snapshot!
Please learn how to create one here:
http://www.ranorex.com/support/user-gui ... files.html
Snapshot will help us to understand the structure of table and available attributes of elements.
Thanks for the screenshot, but what I asked for is Ranorex Snapshot!

http://www.ranorex.com/support/user-gui ... files.html
Snapshot will help us to understand the structure of table and available attributes of elements.
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: How to get the disabled tags based on the main tabletag
Ofcurse i shuld hve send you bt its not possible.If we do based on the structure it differs when we use vth other pages i have to form a common function wat evrver the page it may be if diasabled tags are present it should throw the message containing disabled tags
In the above pic,
table xpath is:.//table
select tag path which i rounded is .//select[@id="lineOfBusinessId"]
In the above pic,
table xpath is:.//table
select tag path which i rounded is .//select[@id="lineOfBusinessId"]
Re: How to get the disabled tags based on the main tabletag
OK, without the snapshot, I can only guess then xpath to find all disabled elements should look like this:
I would suggest to add a new element with such xpath to repository. Then create new user code action with this code:
Code: Select all
table//*[@disabled='True']
public void ListAllDisabledElements(Ranorex.Core.Repository.RepoItemInfo repoElement) { //create IList of all elements, available to given repo element IList<Ranorex.Unknown> allElementsList = repoElement.CreateAdapters<Ranorex.Unknown>(); //go through list of all elements and save obtained values to CSV connector file foreach (Ranorex.Unknown unknownTagElement in allElementsList) { //make sure the element is visible if(!unknownTagElement.Visible) { unknownTagElement.EnsureVisible(); } //get preferred capability of selected element string prefCapability = unknownTagElement.Element.PreferredCapability.DisplayName; Report.Info("Disabled Element", "Preferred Capability: " + prefCapability); } }This should list all disabled elements in table and list them in report (their preferred capability). Then you can do whatever you want with them. Of course, it should be possible to find all disabled elements also without using predefined repo item, e.g. via Find method (based of above mentioned xpath)?
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