Hello Ranorex Users,
I am Sai, workring with Ranorex fast few years.
I got one scenario from client and don't know how Ranorex fit for this scenario. Please find the requirements is the following.
In the manual process I follow the steps which are
1. Open Ranorex Spy
2. Click on Track
3. Click on any button in an application
4. Ranorex spy gives me the information/properties of the button I clicked like image or text, size of rectangle etc
I want to do the above in an automated way which is
1. Whenever I click the left mouse button wherever in the screen or in an application
2. Capture the details of what I clicked
Note: During run time, i will track the elements by spy tool, at the same time Ranorex must take the properties of selected element (where i click on app) and report it.
Let me know if you require more information.
Any reply appreciable.
Thanks in advance.
Sai
print the properties of elements when i track during Runtime
Re: print the properties of elements when i track during Runtime
Hi,
I will just repeat what I suggested via PM...
I will just repeat what I suggested via PM...
I don't think there is a way to achieve this with Ranorex spy. The only possibility could be using Spy, together with another tool (like AutoIt), with which you can read the Spy properties and save them to file (or do whatever you want with them). This must be done in a loop. This is the only way I can currently think of.
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: print the properties of elements when i track during Runtime
Hi Sai,
Unfortunately, it is not possible to achieve your intention. However, there is a similar approach, which allows you to get all properties of an element during runtime, using its RxPath. Please take a look at the following lines of code.
Hope this helps.
Regards,
asdf
Unfortunately, it is not possible to achieve your intention. However, there is a similar approach, which allows you to get all properties of an element during runtime, using its RxPath. Please take a look at the following lines of code.
Code: Select all
Element myButton = "<RanoreXPath>";
foreach (var attr in myButton.Role.Attributes)
{
Report.Info("Attribute: " + attr);
Report.Info("Value: " + myButton.GetAttributeValueText(attr.Value.ToString()));
}
foreach (var cap in myButton.Capabilities)
{
foreach (var attr in cap.Attributes)
{
Report.Info("Attribute: " + attr.Value.ToString());
Report.Info("Value: " + myButton.GetAttributeValueText(attr.Value.ToString()));
}
}
foreach (var attr in myButton.DynamicCapability.Attributes)
{
Report.Info("Attribute: " + attr);
Report.Info("Value: " + myButton.GetAttributeValueText(attr.Value.ToString()));
}
Regards,
asdf