jarmo / RAutomation

RAutomation
MIT License
100 stars 33 forks source link

Upload File on multiple browser failed #71

Closed sarosini closed 10 years ago

sarosini commented 11 years ago

Hi,

Actually I have tried to upload file on a multiple browsers(launching three Firefox browser instances) on each browser i am doing file upload one by one. For example:

  1. first upload file on browser # 1. - It got success)
  2. second upload file on browser # 2 - It got failed, because window has been triggered but Rautomation can't find that window, so it throws me a timeout error.

Please advice

jarmo commented 11 years ago

Please show us the relevant code.

sarosini commented 11 years ago

This is the code I am trying in all three browsers:

Pseudo Code:

@browser1.button(:id => "upload").click window = RAutomation::Window.new :title => windowTitle window.text_field(:class =>"Edit").set(file_name) window.button(:value => "&Open").click

after successful file upload, I am triggering the following code:

@browser2.button(:id => "upload").click window = RAutomation::Window.new :title => windowTitle window.text_field(:class =>"Edit").set(file_name) window.button(:value => "&Open").click

Here I am getting timeout error for Rautomation, but windows dialog box has been opened up.

Note: All my testing is for the same URL only. All three browsers are Firefox

Thanks in advance

jarmo commented 11 years ago

Is it possible that after the first "&Open" click and clicking "upload" again the previous upload window is still present long enough so your second RAutomation window will point to the same window?

Try something like this before clicking the upload button in browser2:

Watir::Wait.until { !window.present? }
sarosini commented 11 years ago

I have tried this wait statement,but the same result, failed.

Note: Both uploads is not on the same browser, they are two different browsers.

leviwilson commented 11 years ago

Would it be possible to get a sample test posted that illustrates this exact problem?

jarmo commented 10 years ago

Closing this due to inactivity.