Forum Discussion

denhenp's avatar
denhenp
New Contributor
9 years ago
Solved

WPF app with AutomationId.

Hi,  Im in need of some help, and i hope you wonderfull people can help me out here. Im trying to use AutomationId in my test scripts, but can't get it working at all. Unless I still use the fu...
  • NisHera's avatar
    9 years ago

    it would be something like below

     

    buttonSearch = Sys.Process("Blabla1").UIAObject("Blabla2").FindChild('automationId', 'SearchButton', 20, true);
    buttonSearch.Exists? buttonSearch.ClickButton(): Log.Error('Can not find Search Button');

     

    I have assumed 

    1) Object blabla2 is available at given time

    2) automationId is a property of your button

    3) ClickButton() method is avilable in button. if not you hv to identify similer method

    4) var buttonSearch    defined in function