Disable web security for input file type elements?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Disable web security for input file type elements?

Postby darbid » Sun Jan 27, 2019 3:43 am

I am automating a single intranet site. I need to add a file using an input element of type=file.

I understand that the standard settings of all webbrowsers is to deny javascipt access to click on this element.

How can I relax this setting? Is there a command line option or will this require a special build?
darbid
Newbie
 
Posts: 8
Joined: Sun Jan 13, 2019 9:06 pm

Re: Disable web security for input file type elements?

Postby amaitland » Sun Jan 27, 2019 5:10 am

I've never seen any reference to such a setting.

Focus browser, focus element in JavaScript then send enter key press works. You can also send mouse down + up, requires calculating element coordinates.

CefBrowserHost has methods for sending key/mouse events, make sure browser has focus first.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1292
Joined: Wed Jan 14, 2015 2:35 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 85 guests