support MSHTML ?

4 posts, 0 answers
  1. yudha
    yudha avatar
    2 posts
    Member since:
    Sep 2012

    Posted 04 Jan 2011 Link to this post

    I use axwebbrowser before, so i want to change it become webAII, Question does it support mshtml ? so i don't need to change many codes ?

    WaTin support MsHTML :), i hope webAII support too.

    My codes now :

    HTMLDocument Document =  (HTMLDocument)wb.Document;
                  HTMLInputElement iptUserName = (HTMLInputElement)Document.getElementById("f_username");
                    iptUserName.value = StaticClass.BLI.articlecellUser;

                    HTMLInputElement iptPassword = (HTMLInputElement)Document.getElementById("f_password");
                    iptPassword.value = StaticClass.BLI.articlecellPass;

                    HTMLInputElement iptLogin = (HTMLInputElement)Document.getElementById("B7");
                    iptLogin.click();
  2. Keaegan
    Admin
    Keaegan avatar
    126 posts

    Posted 05 Jan 2011 Link to this post

    Hello yudha,

    Unfortunately, you will need to change your code. Our tool will need the code setup in C# or VB.net in order to work with our Framework. I apologize that we do not support MsHTML for coding your steps within WebAii. Please let us know if you have further inquiry on this.

    Kind regards,
    Keaegan
    the Telerik team
    Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
  3. yudha
    yudha avatar
    2 posts
    Member since:
    Sep 2012

    Posted 05 Jan 2011 Link to this post

    can you tell me how the code in C# to take "image" in a website ?

    it always become a problem in axwebbrowser and waTin.
    and to solve we copy image from browser and put in a picture box

    Please don't take URL from the image and load it in picture box or etc,
    Cause some image in website use session, so it always change :)
  4. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 06 Jan 2011 Link to this post

    Hi yudha,

    Sure, here's a working sample test:

    [TestMethod]
    public void CaptureImage()
    {
        // Load our webpage in the browser
        Manager.LaunchNewBrowser();
        ActiveBrowser.NavigateTo("http://www.aspenview.org/do/");
     
        // Locate the Happy New Year image
        HtmlImage img = Find.ByExpression<HtmlImage>("src=/do/images/stories/happy-new-year-wallpaper-020.jpg", "tagname=img");
     
        // Make sure the image is 100% visible in the browser window
        img.ScrollToVisible(ScrollToVisibleType.ElementBottomAtWindowBottom);
     
        // Take snapshots of the image, the entire browser window, and the desktop
        img.Capture(@"C:\Temp\CapturedImages", "HappyNewYear.bmp");
        Log.CaptureBrowser(ActiveBrowser);
        Log.CaptureDesktop();
    }

    Notice how we're actually capturing a bitmap snapshot of how the image appears within the browser window. We don't go and fetch the image from the source URL.

    Regards,
    Cody
    the Telerik team
    Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
Back to Top