File upload dialog fail to open

5 posts, 0 answers
  1. Andrew
    Andrew avatar
    1 posts
    Member since:
    Oct 2013

    Posted 18 Oct 2013 Link to this post

    I have done a very simple recording to invoke file upload dialog.
    I'm testing it with major browser including IE, FF and Chrome.
    However, the same test suppose to work with all browsers but it doesn't.
    Chrome fail to start to navigating to the URL specified.
    It just stuck at a point of preparing browser for automation.
    I even tried to add delay but no luck.

    Below is the log for the test:

    Overall Result: Fail
    ------------------------------------------------------------
    '10/18/2013 11:28:27 AM' - Using .Net Runtime version: '4.0.30319.18052' for test execution. Build version is '2013.1.911.0'.
    '10/18/2013 11:28:27 AM' - Starting execution....
    ------------------------------------------------------------
    ------------------------------------------------------------
    '10/18/2013 11:28:32 AM' - Using 'Chrome' version '30.0.1599.101' as default browser.
    '10/18/2013 11:28:32 AM' - 'Pass' : 1. Navigate to : 'file:///C:/Users/awong/Desktop/test.html'
    '10/18/2013 11:28:38 AM' - 'Pass' : 2. Wait for '6000' msec.
    '10/18/2013 11:29:08 AM' - 'Fail' : 3. Click 'FileUploadFile'
    ------------------------------------------------------------
    Failure Information:
    ~~~~~~~~~~~~~~~
    Unable to locate element. Details: Attempting to find [Html] element using
    Find logic
     (Html): [id 'Exact' fileUpload] AND [tagname 'Exact' input]

    Unable to locate element. Search failed!

    Learn more about finding elements here:
    http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/troubleshooting_guide/test-execution-problems/unable-to-locate-element.aspx
    ------------------------------------------------------------
    '10/18/2013 11:29:08 AM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
    ------------------------------------------------------------
    '10/18/2013 11:29:08 AM' - Overall Result: Fail
    '10/18/2013 11:29:08 AM' - Duration: [0 min: 36 sec: 581 msec]
    ------------------------------------------------------------
    '10/18/2013 11:29:09 AM' - Test completed!

    I have also attached the log file from Test Studio and the sample html

    Please let me know if anyone has an answer.

    Thanks.
  2. Daniel
    Daniel avatar
    13 posts
    Member since:
    Aug 2013

    Posted 18 Oct 2013 Link to this post

    I had the same issue.  Chrome doesn't allow you to browse to local files, even in this case if you set the Telerik extension to have permission to do so.

    You can open the file using "ctrl + o" and select the file, which probably doesn't help in your situation.
  3. Mario
    Admin
    Mario avatar
    8 posts

    Posted 23 Oct 2013 Link to this post

    Hello Andrew,

    Daniel is certainly correct in his statement, Google Chrome disables features such as navigating to a local file like 'C:\TESTING.html', no matter the level of permission.

    A possible workaround is to use a local IIS server for testing with test pages like this. By putting your test page on a local IIS server you would navigate to something more like, 'http://localhost/TestPages/testing.html', which Chrome does not disable.

    Please let me know if you have any additional questions.

    Regards,
    Mario
    Telerik
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  4. Araceli
    Araceli avatar
    1 posts
    Member since:
    Nov 2017

    Posted 01 Oct in reply to Daniel Link to this post

    It was happening the same. In Chrome there is no way to navigate to a local file like 'C:\MyTest.html'. It worked like this:

    Keyboard (KeyPress) - Ctrl+O (1 times) on 'BodyTag'

    Handle 'FileUpload' dialog

       FileUploadPath: C:\MyTest.html

       HandleTimeout: 25000 (value by default)

       HandleButton: OPEN

       InitializationTime: 250 (value by default)

    Thank you Daniel

  5. Elena
    Admin
    Elena avatar
    1155 posts

    Posted 02 Oct Link to this post

    Hello Araceli,

    I am pleased to know that the solution, which Daniel shared, was helpful for you. 

    Regards,
    Elena
    Progress Telerik

     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top