Below is my code
AutomationElementCollection panes = AutomationElement.RootElement.FindAll(TreeScope.Children, paneCondition);
Basically the above code pulls for all open windows on my desktop. It works fine when run locally using Debug in Visual Studio IDE but there is a problem when deployed to IIS.
The AutomationElementCollection is turning out to be empty when in IIS, in contrast when run in Visual Studio which the count of items in the collection is not 0.
Now how can I fix this problem? Any help would be appreciated :)
BTW, what I'm trying to do is to automate the login of Windows Security Prompt.