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

File upload dialog fail to open

4 Answers 58 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 18 Oct 2013, 06:42 PM
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.

4 Answers, 1 is accepted

Sort by
0
Daniel
Top achievements
Rank 2
answered on 18 Oct 2013, 08:15 PM
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.
0
Mario
Telerik team
answered on 23 Oct 2013, 09:38 PM
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!
0
Araceli
Top achievements
Rank 1
answered on 01 Oct 2019, 02:55 PM

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

0
Elena
Telerik team
answered on 02 Oct 2019, 03:53 PM

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!
Tags
General Discussions
Asked by
Andrew
Top achievements
Rank 1
Answers by
Daniel
Top achievements
Rank 2
Mario
Telerik team
Araceli
Top achievements
Rank 1
Elena
Telerik team
Share this question
or