0

I am working on a modal dialog which helps me upload external files to a web-application. So far I am able to add an external file to the upload popup of the application. But, I am struggling to get back the control from Modal dialog to the upload pop-up. Here’s the locators for the popup div element

<div tabindex="-1" class="ui-dialog-buttons" role="dialog" aria-describedby=" uploadAttachmentsDialog" aria-labelledby="uid1" style="left: 338px; top: 223px; width: 600px; height: auto; display: block; position: absolute; z-index: 20002;">

By using the above “aria-labelledby” attribute I was able to get the pop-up and launch the modal dialog. But, after the modal dialog closes after selecting a file and clicking Open button, I am not getting the focus/control back to the popup. Can anyone please guide me on this. Following is how I have handled the modal

window = RAutomation::Window.new(:title => "Open", :adapter => :autoit)
window.text_field(:ID => "1148").set "path_to_file"
window.button(:ID => "1").click
exl
  • 11
  • 1
  • Are you saying that the dialog is using an input of type "text" instead of type "file"? – Justin Ko Aug 02 '16 at 17:59
  • No Justin, I don't have any problem in grabbing the file from the dialog or neither its type. Once I click Open button in the dialog the concerned file gets added to the upload popup in my application. Here I am not getting the focus/control back to the popup. I am struggling in that. – exl Aug 02 '16 at 18:10
  • Got it working without "autoit". [link](https://gist.github.com/jarmo/745734#file-rautomation_edit-rb) – exl Aug 02 '16 at 21:49

0 Answers0