Setting location

0 views
Skip to first unread message

JoeGaudet

unread,
Aug 23, 2011, 12:05:14 AM8/23/11
to lebowskifw
Hey Mike,

I was wondering about interacting with the location ?

Our app makes use of statecharts, and there doesn't appear to be a
simple way to get it to load into a particular state.

However, our app does have routes set up, so we can do it by
arbitrarily setting the url.

I can't see an obvious way other than:

App = MainApplication.new \
:app_root_path => "/darkhorse#discussions/1",
:app_name => "darkhorse",
:browser => :firefox

This seems a bit rough for scoping the tests, given that I may want to
test:

discussions/1/add
discussions/1/edit

etc.

In one spec file?

Do you have any thoughts on a way I should maybe approach this?

.joe

MikeC

unread,
Aug 23, 2011, 1:58:51 PM8/23/11
to lebowskifw
Hey Joe,

You can use the app's driver to change the location, but the only
problem is that Selenium 2 has a bug that prevents it from responding
when you change just the hash or the relative URL. So if you try doing
the following:

App.driver.open '/darkhorse#discussions/1/add'

The selenium server ends up hanging. I'll need to update Lebowski to
get around this issue, but should also be addressed in Selenium
itself.

-Mike
Reply all
Reply to author
Forward
0 new messages