Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safari: Unable to upload File using file chooser window, error: 'This Safari window is remotely controlled by an automated test.' #6198

Closed
poorvikamahesh opened this issue Jul 24, 2018 · 2 comments

Comments

@poorvikamahesh
Copy link

OS:
10.13.4 (High Sierra)

Selenium Version:
3.12.0

Browser:
Safari (11.1)

I am trying to automate an application that requires us to choose a file from the Select file window. (Please note, there is no text box /input field where we can give the path of the file)

We are using AutoIt / Robot class for other browsers.

But for Safari we are unable to even open the File chooser window. Safari blocks it.

Is there any workaround for the same?

Attached is the screen shot of the error

screen shot 2018-07-24 at 8 57 03 am

@twalpole
Copy link
Contributor

twalpole commented Jul 24, 2018

There has to be a file input field somewhere in the page, possibly hidden, for the page to trigger the file select window to open. The workaround is to execute JS to change the elements style and make that file input visible then send keys to that element for the file name you want to upload

@lmtierney
Copy link
Member

Unfortunately as you have found, you cannot use the safari outside of using the w3c API and safaridrive while in automation. If you think this is in error, you can raise an issue with Apple: https://bugreport.apple.com/

In the future Please send questions to the selenium user group.

@lock lock bot locked and limited conversation to collaborators Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants