Interesting question - at a guess, I'd say that you would need to override the user agent header to impersonate eg mobile safari.
I haven't tried it, but this gem looks like it might do kind of what you want? http://watirmelon.com/2012/03/27/introducing-webdriver-user-agent-gem-a-quick-way-to-run-ruby-webdriver-tests-emulating-mobile-devices/ On 31/10/2012, at 7:11 PM, jamesl <[email protected]> wrote: > Hi All, > > I'm needing to test responsive layouts and functionality and I'm hoping to use > firefox and the usual capybara / selenium setup. > > How can I trick the browser into thinking it is a mobile size device? > Obviously or not so obviously changing screen size isn't enough > as I want Twitter Bootstrap to also think it is running on a mobile. > > - James. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby or Rails Oceania" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/rails-oceania/-/689K_OencTsJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rails-oceania?hl=en. -- You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rails-oceania?hl=en.
