I want to find the elemnt from the visible area of the desktop! How to get the visible element alone?
Find the attachment below for better understanding. Methods I followed,
1. Foreach
Code: Select all
IList<Container> tocThumbList=repo.appName.toc.tocContainer.FindChildren<Container>();
foreach(var tempThumb in tocThumbList)
{
if(tempThumb.Element.GetAttributeValueText("Caption")=="46-47" && tempThumb.Element.Visible)
{
tempThumb.Click();
Report.Info("Element Found...");
}
}
Same code with foreach loop.
------------------
Currently this code is getting all the thumbnails from the container, which are not visible in the desktop screen.
Is there any alternative solution to find and click the elemnt which are visible in this current screen. It should not find the hidden thumbnail.
Thanks in advance.