在 silverlight 中操作网页元素
我目前正在开发一个应用程序,需要对网站上的表单进行一些操作。当前的实现是在 WPF 中使用 WebBrowser 控件完成的。我可以成功填写字段并单击网站上的按钮。
我真的很想在 Silverlight 中实现相同的功能,但 Web 浏览器似乎严重瘫痪,我无法访问文档来填写任何内容。有什么方法可以做到这一点吗?
如果我可以有一个 iframe 并操作 Silverlight 应用程序中的内容,那就更好了,但我也不确定这是否可行。
I'm currently working on an application where I need to do some manipulation of forms on websites. The current implementation is done in WPF with a WebBrowser control. I can successfully fill in fields and click buttons on the sites.
I would really like to implement the same functionality in Silverlight but it seems like the WebBrowser is severely crippled and I cant access the Document to fill anything in. Is there any way to do this?
It would be even better if I could just have an iframe and manipulate the contents from a Silverlight application, but I'm not sure if this is possible either.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 HtmlPage类和HtmlElement 对象。
You can manipulate HTML DOM as well as invoke JS functions from Silverlight using the HtmlPage class and HtmlElement objects.