mercredi 30 novembre 2016

SendKeys to a windows file dialog

I want to send the string ABC to the input field of a windows file dialog. With this code line I can set the focus to the correct element.

var filedialogOverlay = drv.SwitchTo().ActiveElement();

But the following code doesn't write the string into the element.

Thread.Sleep(1000);
filedialogOverlay.SendKeys("ABC");

Aucun commentaire:

Enregistrer un commentaire