Hi,
I need to retrieve the element in my Automation Script. I have its IP address. There are a number of documented methods for finding elements using name, id, view etc, but is there a way to find the element using its IP address?
Hi Trong,
I believe there is not a specific method that you could use to get an element based on the IP address. However, you could proceed as follows:
// Get all the elements in the cluster (Root view = -1)
Element[] lElements = engine.FindElementsInView(-1);// Get Element based on polling IP
Element myElement = lElements.Where(element => element.PollingIP == "10.11.12.13").First();if (myElement != null)
{
engine.GenerateInformation("Element name=" + myElement.ElementName);
}
Thanks Miguel. This solution works also.