urgent - inconsistent behavior firing events in vapir-firefox

11 views
Skip to first unread message

pmneve

unread,
Dec 1, 2010, 10:19:10 PM12/1/10
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

pmneve

unread,
Dec 1, 2010, 10:49:50 PM12/1/10
to Vapir
Four more runs of the raw script. Same error same place:

Time out is consistently two minutes ( I am more impatient than I
thought )

pat

Ethan

unread,
Dec 2, 2010, 9:26:10 PM12/2/10
to va...@googlegroups.com
Do you have a page publicly available that I can try to reproduce this against? 
I know one other person has encountered this, and have plans to put code to at least work around it in the next release (which, unfortunately, keeps getting pushed back due to other commitments). But I would very much like to reproduce this in my own browser to try to get a real fix in (as opposed to just the workaround I currently have planned). 

-Ethan

pmneve

unread,
Jan 11, 2011, 3:48:42 PM1/11/11
to Vapir
Ethan,
Sorry I haven't replied sooner. Got really snowed dealing with a
crisis or two...

Unfortunately the site(s) am using are not public.

Thanks for your help!

On Dec 2 2010, 6:26 pm, Ethan <notet...@gmail.com> wrote:
> Do you have a page publicly available that I can try to reproduce this
> against?
> I know one other person has encountered this, and have plans to put code to
> at least work around it in the next release (which, unfortunately, keeps
> getting pushed back due to other commitments). But I would very much like to
> reproduce this in my own browser to try to get a real fix in (as opposed to
> just the workaround I currently have planned).
>
> -Ethan
>
Reply all
Reply to author
Forward
0 new messages