jarmo / RAutomation

RAutomation
MIT License
100 stars 33 forks source link

RAutomation doesnt work on SeleniumGrid #109

Closed achyuthgit closed 7 years ago

achyuthgit commented 7 years ago

Meta -

OS: Windows 7 Selenium Version: 2.52.0, IDE, etc Selenium Grid Extras 3.0.1 Browser: Chrome Browser Version: 54.0.2840.99 (64-bit)

Expected Behavior -

Below code which clicks on "Browse File" and open windows popup to browse file and submit should work on Selenium & Selenium Grid

HTML Code

<div layout="row" layout-align="center center" class="layout-align-center-center layout-row"><input type="file" accept="text/csv,application/vnd.ms-excel,application/vnd.oasis.opendocument.spreadsheet,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" id="navigate-to-browse-file" class="input-box full-width ng-pristine ng-untouched ng-valid ng-empty" ngf-select="" ng-model="vm.uploadFiles" ngf-multiple="false" aria-invalid="false"><label class="md-primary md-raised md-button md-ink-ripple" md-ink-ripple="" for="navigate-to-browse-file"><span>Browse File</span><div class="md-ripple-container"></div></label></div>

Ruby Capybara RAutomation Code

And I click the tag "span" with text "Browse File" - Clicking the browse button works

Code for the selecting file in the window popup

file=$uploadfile_path
file = Dir::pwd + "#{file}"
file=file.gsub! "/", "\\"
window_handle = RAutomation::Window.new(:title => /#{window}/i)
window_handle.text_field(:class => field_input, :index => 0).set file

Actual Behavior -

Above code works with Selenium and doesn't work with SeleniumGrid

Steps to reproduce -

Click on browse file functionality in any application (cannot provide link to our application) ex: https://uploadfiles.io/ In windows popup enter the file path browse file window popup

screenshots browse file window popup

jarmo commented 7 years ago

Have not used Selenium nor Selenium Grid so don't have any ideas how that interferes with RAutomation. RAutomation is a totally separate library which is not dependent in any other automation libraries thus there is no specific code related with Selenium, Selenium Grid or any other automation library.

This probably means that the problem (you didn't give any backtrace or anything indicating what does "doesn't work" mean) is within Selenium Grid or Ruby instead.

Closing this issue, but you can reopen it if you think that the problem still lies within RAutomation.

achyuthgit commented 7 years ago

We use Ruby-Cucumber-Selenium automation framework and selenium grid to run automation scripts parallel on multiple machines.

Rautomation successfuly handle window popup on Single machine and below is the error when i run same script on SeleniumGrid

Unable to find file field "navigate-to-browse-file" (Capybara::ElementNotFound)

jarmo commented 7 years ago

Capybara::ElementNotFound exception is definitely not a RAutomation error.