Welcome Guest Search | Active Topics | Sign In | Register

can not popup filedialog Options
wffengzheng
Posted: Tuesday, November 20, 2018 3:46:31 AM
Rank: Newbie
Groups: Member

Joined: 11/20/2018
Posts: 1
I use chrome to log in to a website, enter document.get.ElementByid('XXX').click() in the console to simulate clicking on an input, and pop up filedialog, but execute webview1.EvalScript(document.get.ElementByid(' XXX').click()) in eo, but does not pop up filedialog, how to deal with it?thanks!
eo_support
Posted: Tuesday, November 20, 2018 8:35:43 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

No. You can not do that. The browser engine specifically block such simulation to ensure that a file dialog can only be invoked through an user action (such as clicking the browser button of a file input element). The dev console turned this check off because it's a debug tool. However EvalScript has normal JavaScript running behavior with all the security check on. So it is not possible for you to simulate this through code at runtime. Such action can only be triggered by the end user.

Thanks
David
Posted: Saturday, January 18, 2020 3:05:12 PM
Rank: Newbie
Groups: Member

Joined: 2/7/2017
Posts: 1
wffengzheng, Did you figure out how to do this, I am using headless with a thread runner and need to Upload a file to a website. It seams that the filedialog handler never Fires, i can download files using the beforedownload and downloadcomplete handlers, how is this different?
eo_support
Posted: Monday, January 20, 2020 2:33:38 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.