It is possible to automate Silverlight with PowerShell? I want to control Silverlight, press buttons etc.
Li开发者_开发问答ke automation with the IExplorer:
$ie = New-Object -ComObject InternetExplorer.Application
$ie.Navigate("http://www.stackoverflow.com")
$ie.Document.getElementById("ButtonID")|foreach{
$_.Click()
}
Searching surfaces white it supports Silverlight see the Silverlight wiki entry. Being a .NET library it should be straight forward to use it with PowerShell. This testing.stackexchange question might also be a good starting point.
Silverlight is a subset of the .NET framework. Certain DLLs will not work within a Silverlight App. If you want the presentation of Silverlight with all the functionality of .NET, then I would suggest using WPF instead.
精彩评论