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

[Solved] Handle login in IE8 when integrated authentication is used

3 Answers 74 Views
Telerik Testing Framework
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Krasimir
Top achievements
Rank 1
Krasimir asked on 18 Feb 2010, 09:06 AM
Hi
I'm evaluationg WebAii framework and run accross an issue with hadling IE8 login dialog

The simple approach does not work:  

Manager.LaunchNewBrowser(

BrowserType.InternetExplorer);

 

Manager.DialogMonitor.AddDialog(

new LogonDialog(ActiveBrowser, "username, "password", DialogButton.OK));

 

Manager.DialogMonitor.Start();

ActiveBrowser.NavigateTo(

"Url");

Afther a quite long search I have found an example of authetication for FF

 

 

public void FireFoxLogin()

 

{

 

// Launch a browser instance

 

 

 

 

Manager.LaunchNewBrowser(

BrowserType.FireFox);

 

 

GenericDialog g = new GenericDialog(ActiveBrowser, "", false);

 

g.HandlerDelegate =

this.HandleFireFoxLoginDialog;

 

g.Title =

"Authentication Required";

 

Manager.DialogMonitor.AddDialog(g);

Manager.DialogMonitor.Start();

 

//Launch Login Dialog Here

 

 

 

 

ActiveBrowser.NavigateTo(

"url");

 

 

g.WaitUntilHandled();

Manager.DialogMonitor.Stop();

}

 

public void HandleFireFoxLoginDialog(IDialog dialog)

 

{

Desktop.KeyBoard.SendString(

"username");

 

System.Threading.

Thread.Sleep(1000);

 

Desktop.KeyBoard.SendString(

"{TAB}");

 

Desktop.KeyBoard.SendString(

"password");

 

Desktop.KeyBoard.SendString(

"{TAB}");

 

Desktop.KeyBoard.SendString(

"{ENTER}");

 

Manager.DialogMonitor.RemoveDialog(dialog);

}


Unfortuanately this approach  is not wokting in internet explorer - the handler delagate is never called

Could you advice of what i have done wrong ?

3 Answers, 1 is accepted

Sort by
0
Missing User
answered on 18 Feb 2010, 09:27 PM
Hello Krasimir,

Since you mentioned that the code is handling the Firefox dialog, but not IE dialog, are you using a 64 bit version of Windows?

If so, please compile your test project in Visual Studio with a 32-bit profile by:

Right clicking test project -> Properties -> Build -> Platform target: x86

Or, if you are using 32 bit Windows, then you can use a condition in your current code that does:

if(ActiveBrowser.BrowserType == BrowserType.FireFox)
g.Title = "Authentication Required";
else
g.Title = "Title of dialog window in IE";

Please post back if none of the above works.

Regards,
Nelson Sin
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Krasimir
Top achievements
Rank 1
answered on 19 Feb 2010, 09:58 AM
Hi, Nelson

Thank you for your answer - it help me move out.  Actually I'm using a 32 bit version of Windows 7. In this case the dialog title is "Windows Security".

My bad - I have missed the fact that WebAii framework is actually using the specified property Text to hook up the correct log-in dialog.

Could you also advise how login dialogs are handled by Design canvas during recording ?
And one more question -  do you provide additional documentation for WebAii framework along with http://www.artoftest.com/support/webaii/topicsindex.aspx or this is the only one currently available ?

Best regards
Krasimir

0
Konstantin Petkov
Telerik team
answered on 19 Feb 2010, 10:39 AM
Hi Krasimir,

We're glad that helped you move ahead.

Yes, you've pointed the documentation resource dedicated for the WebAii framework. Please let us know if you have any feedback on that. Is there anything you think might help adding there? We're constantly looking into improving our support resources.

Talking about resources, this is the page listing everything you should have in mind when working with WebAii framework and WebUI Test Studio. These are user manuals, documentation, videos. Here is the video that can help you figure out how to handle the dialogs in WebUI Test Studio/Automation Design Canvas tools.

I hope this helps! Please let us know if you have further questions.

Kind regards,
Konstantin Petkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Telerik Testing Framework
Asked by
Krasimir
Top achievements
Rank 1
Answers by
Missing User
Krasimir
Top achievements
Rank 1
Konstantin Petkov
Telerik team
Share this question
or