How do I use HtmlDocument in CF3.5

蓝咒 提交于 2019-12-02 13:30:30

问题


I'm working on a Device that runs on windows CE and i need to automate a login process. I was able to achieve this in a Forms Application using the code below but it doesn't seem like I can use the same process on the smart device. Is there a way to do the same thing while working in CE?

        string butts = webBrowser1.Url.AbsoluteUri;
        HtmlDocument doc = webBrowser1.Document;
        HtmlElement userValue = doc.GetElementById("username");
        userValue.SetAttribute("value", "user");
        HtmlElement passValue = doc.GetElementById("password");
        passValue.SetAttribute("value", "pass");
        HtmlElement subButton = doc.GetElementById("submit");
        subButton.InvokeMember("click");

回答1:


The HtmlDocument class, and really all of the System.Windows.Forms.HtmlXxx objects do not exist in the Compact Framework.

If you have a very small set of things you want to access, you might be able to roll your own implementation. You might be able to borrow some from the Mono code base as well. Otherwise, there really aren't any good answers.



来源:https://stackoverflow.com/questions/20887889/how-do-i-use-htmldocument-in-cf3-5

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!