Problem with DevExpress file upload

6 posts, 0 answers
  1. Florian
    Florian avatar
    3 posts
    Member since:
    Mar 2013

    Posted 27 Mar 2013 Link to this post

    Hi there

    While I know that the Telerik Testing Framework officialy does NOT support 3rd party controls like the ones from DevExpress (except of course the Telerik controls), I'd like to make things work with the file upload control from DevExpress.

    See it in action here: http://demos.devexpress.com/aspxperiencedemos/uploadcontrol/Example.aspx

    It has some magic (input control follows the mouse while the mouse is over the control). You can see the behaviour when inspecting the element (for example in Chrome). But if I try to click anywhere, nothing happens (at least in chrome). 

    Is there any way to make this work?

    Thank you very much.
    Florian
  2. Boyan Boev
    Admin
    Boyan Boev avatar
    1045 posts

    Posted 27 Mar 2013 Link to this post

    Hello Florian,

    If you want only to click on the file upload control you can achieve it with this code:

    HtmlTable table = ActiveBrowser.Find.ById<HtmlTable>("ContentHolder_uplImage_UploadInputs");
    table.MouseClick();

    I recorded a short video to demonstrate it. 

    If I am missing something please elaborate a bit more on your scenario.

    Jing video demonstration may also help us to better understand.

    Hope to hear from you soon.

    Kind regards,
    Boyan Boev
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Florian
    Florian avatar
    3 posts
    Member since:
    Mar 2013

    Posted 27 Mar 2013 Link to this post

    It's interesting to see that this code works - for me, it doesn't. See my code:

    var localFilePath = new FileInfo(@"TestData\Test_IstZustand.xls").FullName;
     
    var dialog = new FileUploadDialog(Browser, localFilePath, DialogButton.OPEN);
    myManager.DialogMonitor.Start();
    myManager.DialogMonitor.AddDialog(dialog);
     
    HtmlTable table = Browser.Find.ById<HtmlTable>("ContentHolder_uplImage_UploadInputs");
    table.MouseClick();
     
    dialog.WaitUntilHandled(10000);

    This code works in none of the browsers I've tested (Chrome, FireFox and IE10). Nothing happens and the WaitUntilHandled() method throws a TimeOutException. Am I missing something?
  4. Boyan Boev
    Admin
    Boyan Boev avatar
    1045 posts

    Posted 27 Mar 2013 Link to this post

    Hi Florian,

    What exactly does not work? The click or the dialog handling? 

    If it is the click step try to perform a double click:

    table.MouseClick(MouseClickType.LeftClick);

    Please record a Jing video demonstrating the entire process, so we can better understand what is happening.

    This code is working correctly on my side, see this video.

    Regards,
    Boyan Boev
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  5. Florian
    Florian avatar
    3 posts
    Member since:
    Mar 2013

    Posted 27 Mar 2013 Link to this post

    Thank you very much for your help.

    The click works (no exception is thrown) but nothing happens. The "Upload file" dialog never appears...

    I'm using Visual Studio 2010 and NUnit to run the tests. I'm running exactly the same code as you. At the moment it doesn't make much sense to record a video, because you would just see the browser opening, navigating to the page and then nothing more. It just stays that way for 10 seconds and then runs in a timeout.

    I don't use TestStudio, only an Assembly with a reference to ArtOfTest.WebAii.
  6. Boyan Boev
    Admin
    Boyan Boev avatar
    1045 posts

    Posted 29 Mar 2013 Link to this post

    Hi Florian,

    Please excuse me, the code I've provided for performing a double click is wrong. The correct one is:

    table.MouseClick(MouseClickType.LeftDoubleClick);

    Please try out this code and let me know if it helps.

    If the issue persists please send us the test project so we can investigate further and give you a working solution.

    I look forward to hearing back from you.

    Regards,
    Boyan Boev
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top