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

FileUploadDialog on locked screen???

2 Answers 64 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 15 Feb 2012, 03:49 PM
Hi

I'm trying to make a test which uploads some files, is this possible on a locked screen??, below is my code, the idea is to give a count of how many times the image should be uploaded and it works fine but then if i lock the screen it just hangs and doesn't seem to ever timeout with an error.

So question:
Can this be done on locked screen?

Possible bug report:
The file upload doesn't seem to ever timeout when it fails, instead it seem to just stop.




            currentTest.ActiveBrowser.Manager.DialogMonitor.Start();

            for (int i = 0; i < count; i++)
            {
                FileUploadDialog fileUp = new FileUploadDialog(currentTest.ActiveBrowser, imagePath, DialogButton.OPEN);
                currentTest.ActiveBrowser.Manager.DialogMonitor.AddDialog(fileUp);
                currentTest.ActiveBrowser.Find.ByExpression<HtmlInputFile>(attachFileInput).Click();
                fileUp.WaitUntilHandled(SharedValues.DefaultTimeout);
                currentTest.ActiveBrowser.Manager.DialogMonitor.RemoveDialog(fileUp);
            }

            currentTest.ActiveBrowser.Manager.DialogMonitor.Stop();

2 Answers, 1 is accepted

Sort by
0
Accepted
Anthony
Telerik team
answered on 15 Feb 2012, 04:08 PM
Hello Martin,

No. dialog handling cannot take place on a locked screen. There is no "desktop" to attach to and the dialog monitor cannot initialize. Beyond that, certain actions within the dialog handling require simulated key presses which fail on a locked screen as well.

See here and here for more information and possible work-arounds.

Kind regards,
Anthony
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Martin
Top achievements
Rank 1
answered on 15 Feb 2012, 05:37 PM
Thanks for the quick response.
Tags
General Discussions
Asked by
Martin
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Martin
Top achievements
Rank 1
Share this question
or