pmneve
unread,Dec 1, 2010, 10:19:10 PM12/1/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Vapir
I am experiencing hangs with both clicks and locating a div when
running against firefox.
Here is the one error message (other than those telling me the browser
is gone when I kill it after 5 minutes) that appears frequently:
C:/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.1/lib/vapir-common/
waiter.rb:137:in `try_for': Waiting for requests in progress to
complete timed out. (RuntimeError)
(full trace at the bottom of this note)
It takes differing amounts of time to timeout. Sometimes it actually
runs without a problem.
I am running these same steps inside a browser testing application
(that launches and validates another application in another
browser).
Context in order of increasing consistency:
1. Testing app running in Firefox, launching another Firefox window to
access the application under test.
Nearly always hangs at the first checkbox click. Sometimes actually
times out with the above error if my patience lasts.
2. Testing app running in IE, launching Firefox to access the
application under test.
Usually hangs at the 'renderBtn' link click (it is not a real button,
but a link gussied up to look like one), but sometimes hangs at the
first checkbox click. Occasionally times out before I do and logs
the error above
3. Raw script running just the Vapir commands without the wrapping
application and its validations (aka 'tests') and reporting. Has run
at least once. But in the last three attempts it 1. gave the error
message above, 2 and 3. tried my patience (5 minutes was enough to
wait)
In all three the behavior is similar when running in Rubymine 3.0 or
Aptana Studio 2/Eclipse both in and out of debug mode.
Here is the raw script:
require 'rubygems'
require 'vapir-common'
require 'vapir-firefox'
waiter = Vapir::Waiter.new(15)
browser = Vapir::Firefox.new
browser.goto('xxxxxxx')
#sleep(2)
browser.link(:text, "Data Table").click
#sleep(1)
browser.link(:text, "Data Viewer").click
#sleep(1)
waiter.wait_until { browser.checkbox(:id, "chkBox-
selectChecked").exists?}
browser.checkbox(:id, "chkBox-selectChecked").set
waiter.wait_until { browser.checkbox(:id, "chkBox-
totalLabel").exists?}
browser.checkbox(:id, "chkBox-totalLabel").set
waiter.wait_until { browser.checkbox(:id, "chkBox-
chartPrintExport").exists?}
browser.checkbox(:id, "chkBox-chartPrintExport").set
waiter.wait_until { browser.checkbox(:id, "chkBox-
selectGroup").exists?}
browser.checkbox(:id, "chkBox-selectGroup").set
waiter.wait_until { browser.checkbox(:id, "chkBox-search").exists?}
browser.checkbox(:id, "chkBox-search").set
waiter.wait_until { browser.checkbox(:id, "chkBox-
topRowLabel").exists?}
browser.checkbox(:id, "chkBox-topRowLabel").set
waiter.wait_until { browser.checkbox(:id, "chkBox-
extraTopRow").exists?}
browser.checkbox(:id, "chkBox-extraTopRow").set
waiter.wait_until { browser.checkbox(:id, "chkBox-separator").exists?}
browser.checkbox(:id, "chkBox-separator").set
waiter.wait_until { browser.checkbox(:id, "dt_in_panel").exists?}
browser.checkbox(:id, "dt_in_panel").set
waiter.wait_until { browser.link(:id, 'renderBtn').exists?}
browser.link(:id, 'renderBtn').click ############## hang
occurs here (line 44)
waiter.wait_until { browser.div(:id, 'data-viewer-panel_c').exists?}
myDiv = browser.div(:id, 'data-viewer-panel_c')
sleep(2)
#myDiv.link(:text, 'Description').flash
myDiv.link(:text, 'Description').click
sleep(2)
#myDiv.link(:text, 'Currency').flash
myDiv.link(:text, 'Currency').click
sleep(2)
#puts myDiv.show_all_objects
puts myDiv.to_yaml
browser.close
Here is the trace:
c:\Program Files\waftt>ruby wria_ff_raw.rb
C:/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.1/lib/vapir-common/
waiter.rb:137
:in `try_for': Waiting for requests in progress to complete timed out.
(RuntimeE
rror)
from C:/ruby/lib/ruby/gems/1.8/gems/vapir-firefox-1.7.1/lib/
vapir-firefo
x/firefox.rb:597:in `wait'
from C:/ruby/lib/ruby/gems/1.8/gems/vapir-firefox-1.7.1/lib/
vapir-firefo
x/element.rb:211:in `wait'
from C:/ruby/lib/ruby/gems/1.8/gems/vapir-firefox-1.7.1/lib/
vapir-firefo
x/element.rb:78:in `fire_event'
from C:/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.1/lib/
vapir-common/
element.rb:738:in `with_highlight'
from C:/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.1/lib/
vapir-common/
container.rb:108:in `assert_exists'
from C:/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.1/lib/
vapir-common/
element.rb:731:in `with_highlight'
from C:/ruby/lib/ruby/gems/1.8/gems/vapir-firefox-1.7.1/lib/
vapir-firefo
x/element.rb:69:in `fire_event'
from C:/ruby/lib/ruby/gems/1.8/gems/vapir-firefox-1.7.1/lib/
vapir-firefo
x/element.rb:179:in `click'
from C:/ruby/lib/ruby/gems/1.8/gems/vapir-firefox-1.7.1/lib/
vapir-firefo
x/element.rb:176:in `each'
from C:/ruby/lib/ruby/gems/1.8/gems/vapir-firefox-1.7.1/lib/
vapir-firefo
x/element.rb:176:in `click'
from C:/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.1/lib/
vapir-common/
element.rb:738:in `with_highlight'
from C:/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.1/lib/
vapir-common/
container.rb:108:in `assert_exists'
from C:/ruby/lib/ruby/gems/1.8/gems/vapir-common-1.7.1/lib/
vapir-common/
element.rb:731:in `with_highlight'
from C:/ruby/lib/ruby/gems/1.8/gems/vapir-firefox-1.7.1/lib/
vapir-firefo
x/element.rb:173:in `click'
from wria_ff_raw.rb:44