public override void Upload(string fileName, string fieldSelector, API.Point offset, MatchConditions conditions) { if (offset == null) { var handler = new Automation.Core.DialogHandlers.FileUploadDialogHandler(fileName); using (new Automation.Core.DialogHandlers.UseDialogOnce(_browser.DialogWatcher, handler)) { IElement element = GetElement(fieldSelector, conditions); element.Click(ClickMode.Default); } } else { this.ClickWithin(fieldSelector, offset); this.Wait(TimeSpan.FromMilliseconds(1000)); CommandManager.SendString(fileName + "~"); } }