This is a migrated thread and some comments may be shown as answers.

support MSHTML ?

3 Answers 55 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
yudha
Top achievements
Rank 1
yudha asked on 05 Jan 2011, 02:49 AM
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();

3 Answers, 1 is accepted

Sort by
0
Keaegan
Telerik team
answered on 06 Jan 2011, 01:00 AM
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
0
yudha
Top achievements
Rank 1
answered on 06 Jan 2011, 01:19 AM
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 :)
0
Cody
Telerik team
answered on 06 Jan 2011, 09:19 PM
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
Tags
General Discussions
Asked by
yudha
Top achievements
Rank 1
Answers by
Keaegan
Telerik team
yudha
Top achievements
Rank 1
Cody
Telerik team
Share this question
or