Quantcast
Viewing all articles
Browse latest Browse all 2

Coded UI

UITestControlCollectionutcc = btn.FindMatchingControls();

                MouseClick(utcc);

               This code doesnt look right, how you can  click a collection of objects!?

Ok, first check with highlighter 

utcc.ElementAt(0).DrawHilight(); change numbers until you find correct one (0-N) check in the debug how many controls are in the collection. 

then do click once  you are able to figure out the correct control

Mouse.Click(utcc.ElementAt(1)); example element 1 in the list was correct one 

add reference System.Linq; to use ElementAt method.


Please "Mark it as answer if it answers your question"



Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>