Hi arun_dhananjeyan, there are several ways to do what you've asked.
- The Wait-UiaControlState cmdlet with the -Seconds parameter
Please refer to the page.
Using this cmdlet you can wait for more sofisticated condition than other cmdlets offer. - A 'regular' Get-UiaButton cmdlet has functionality to wait for a control, just set the number of seconds you are ready to wait:
Get-UiaWindow -Name wnd | Get-UiaButton -Name yourButtonName -Seconds 300;
- The Wait-UiaControlIsVisible cmdlet
Get-UiaWindow -Name windowName | Get-UiaButton -Name OK | Wait-UiaControlIsVisible -Seconds 60;