0

While writing test case in Coded UI I came across a issue. Coded UI is failing to identify some of the object that i declared after the page is refreshed, I some how managed to overcome this scenario by using .Find() method in Coded UI, but now Coded UI taking 10 - 20 seconds locate the element in the page. Is there any alternative way to solve this problem

if (strTestName != string.Empty){
    testNameFilter.Find(); 
    testNameFilter.Text = strTestName; 
 }

if (strTestDate != string.Empty){
   testDateFilter.Find();
    testDateFilter.Text = strTestDate;
}
Rahul Das
  • 46
  • 6
  • can you include some details on the type of control and the search properties of each parent control? – Michael Rieger Apr 05 '17 at 18:41
  • See http://stackoverflow.com/questions/23937422/when-would-you-use-the-uitestcontrol-find-method and http://stackoverflow.com/questions/19280845/coded-ui-test-takes-2-3-minutes-to-pass and http://stackoverflow.com/questions/20367855/coded-ui-test-is-slow-waiting-for-ui-thread . – AdrianHHH Apr 05 '17 at 21:13
  • I Have web page in my app where i can filter result based on conditions [Filter result page][1] [1]: https://i.stack.imgur.com/G0xA8.png – Rahul Das Apr 06 '17 at 07:58
  • @MichaelJamesRieger I Have web page in my app where i can filter result based on conditions https://i.stack.imgur.com/G0xA8.png As soon as i enter value in the edit the page refreshes https://i.stack.imgur.com/OQI8s.png and after this refresh coded ui taking 10 - 20 seconds to identify the **sampleTest** hyperlink – Rahul Das Apr 06 '17 at 10:42
  • please post the code you are using to find the item. if there is a wide breadth of objects to search, you want to narrow down the search at multiple levels for faster searching. Also, if possible, please post the markup / xaml for the screen you are testing. – MPavlak Apr 07 '17 at 15:32
  • Please update the question instead of writing into comments. Also, that's how you use the Find() method. – MPavlak Apr 09 '17 at 15:50

0 Answers0