i use C# Selenium in my App, i click on file input and (open window) file dialog show up. I need to pass filepath and then hit enter (return) key.
Requirement: work even if current user is signed out, desktop is locked, RDP session closed
- Selenium built-in SendKeys did not work at all.
- Windows.Forms.SendKeys.SendWait() work not so excatly, path submit is ok, in order to hit enter, process wait for user session. Nuget -
- InputSimulator / WinApi - UAC (UIPI) access denied
Any possibility to submit file without opening dialog in javascript ?
Thanks
Example using Selenium
var button = web.FindElementByXPath("//span[@class='upload']");
button.Click();
Not working
button.SendKeys("path"); //not input element
Windows.Forms.SendKeys.SendWait("..."); //not working for closed user session
InputSimulator.SimulateTextEntry("path"); //access denied because of Windows UIPI