test mobile website in desktop browser - testing

I'm developing a mobile website for iPhone, Android, etc. using jQuery Mobile. I'd like to be able to test this in my desktop browser and was wondering what the best approach is. I guess I could use a plugin to change the User-Agent header to the appropriate value and manually resize the browser to the device's width, but is there a simpler/more reliable way?
Update
Sorry, I should have mentioned that the only hardware available is a Windows laptop

Well if you have a Mac and xCode is installed you can use the Simulator. Open Mobile Safari and point to you web page on all Apple devices
You can also use the Android Emulator ( But I've not tested that it can access the web from the browser )
Alternatively you could use a plugin ( as you have suggested ).
I personally use Chrome with this plugin:
https://chrome.google.com/webstore/detail/ljfpjnehmoiabkefmnjegmpdddgcdnpo
with pretty good results.
I've used Device Anywhere before
http://www.keynotedeviceanywhere.com/
you access the device through a web portal/site and control it, but this costs $$$
Actual device testing in going to be the most reliable
related:
http://sixrevisions.com/tools/10-excellent-tools-for-testing-your-site-on-mobile-devices/ ( other suggestions )
Difference between iPhone Simulator and Android Emulator

In Chrome hit F12 to open the Developer Toolbar. Then click 'Toggle device toolbar' (tablet icon, top left next to select element). You can then choose the device at the top to test.

There's also PerfectoMobile for testing on devices remotely...though it can be painfully slow. I'd really recommend at least getting some 'base' testing devices, if possible.

There is also http://www.browserstack.com/responsive that can be used to get a screenshot of what your site would look like on a number of given devices.
There is however a limitation of how many screenshots you can get in the free version I have linked to here.

I got nice results, visualy, by using Chrome add-on called Ripple Beta. Bad thing is that there is no ability to add some custom device, like tablets of 8" or 9" or bigger... but works. I'm not sure is it able to show some errors visible on real device but seems nice.

Manymo should work very well simulating Android for you. It shows me exactly what my cell phone shows, even though my desktop browsers don't. Manymo is a website with a lot of Android phones pictured. Just click one and enter your URL. There are options such as Android versions and screen sizes.

Look for the Chrome plugin Responsive Web Design Tester - you'll be able to emulate mobile browsers for different device sizes on all platforms.

Related

Cannot view video from publisher using Chrome to iPad with OpenTok

I'm currently trying to set up a connection between my web client and my iOS app, but for some reason my iOS client only sees a black box when using Chrome (version 33). I can see the video just fine if I use Firefox (both in my app and when I put the browsers side-by-side, they can see each other).
This doesn't appear to be a documented known issue with the JavaScript SDK, and I can't see any recent discussion about this on the forums (last post was mine).
The iOS sample can be located here (samples/OpenTokHelloWorld) with the browser page in samples/OpenTokHelloWorld/browser_demo.html
I suggest cd'ing into samples/OpenTokHelloWorld and running python -m SimpleHTTPServer, as it can't be run from a file:/// path.
Here is what my iPad sees:
Chrome:
Firefox:
And Chrome/Firefox (respectively), both publishing video from the same camera
Edit: after testing on other machines, it may be something specific to my environment even though none of my extensions run in Incognito and I don't have any custom plugins installed.
It looks like the OpenTok mobile SDKs with the specific webcam I was using has issues. On Android the video stream will display for a brief moment then segfault, and on iOS there will be no video at all.
I have tested this many times and could not reproduce what you are seeing in your chrome.
Without seeing any console errors or iOS logs the best suggestion is to try clearing your cache, or maybe restarting your computer (longshot)

Mozila Firefox add on for viewing bootstrap application as in mobile

I am Creating an MVC Application using twitter bootstrap 3. Now I need to test the responsive feature in a mobile . I know there is some add on available in Mozilla that allows us to have the same experience as in mobile through desktop, have anyone of you heard of such add on?
You could use the user-agent switcher addon.
However mobile device emulation is one of the point where the Chrome devtools are more feature rich than Firefox/Firebug.
In Chrome, you go to devtools configuration and in the Overrides tab check 'Show emulation view in console drawer'. Then back in devtools click on the show console icon, and finally go to the emulation tab. It let you choose a device, resolution and emulate touch events with the mouse.
Ctrl-Shift-M (Responsive mode) is built into Firefox and will let you work with any size of mobile screen resolution and simulate touch events with the mouse.
There are no presets for specific phones (although you can add new size presets if you want) and you won't be able to spot all differences because you'll always be rendering with Gecko. For increased accuracy you'd have to use a tool that at least emulates different rendering engines. Browserstack can be good for that but in my experience it is tediously slow.
If you are doing user agent detection then an addon to manipulate that might be useful but presumably if you're going for a responsive design you will be more concerned with media query behaviours than hacky user agent tricks.

Do all Android devices include Android Browser?

(e.g. the Chrome browser for Android)
Talking about factory defaults here, not what users can install later.
(Sorry if this is a stupid question, I just can't find an answer anywhere)
Typically consumer facing Android devices do come with the browser. It is part of the core platform.
However, there is nothing stopping a manufacturer from removing the Browser for whatever reason. For example, that Android powered watch will not come with a web browser.
Yes, as it's part of Android OS.

Best desktop browser to test Sencha Touch application?

For testing without an iPhone/Android phone, which desktop browser works best with Sencha Touch? I tried Chrome and Safari, which work fairly well, but both seem to have little issues.
Firefox and IE apparently don't work at all with Sencha Touch. Is there a secret weapon, like a port of a mobile browser, available?
There's a Chrome extension called Ripple that's pretty good, but most things can be tested quite productively in Chrome. Set Ext.is.Phone = true; at the beginning of your script when you need to test the phone UI.
You should be using the iPhone/iPad hardware simulator on a mac, or the Android simulator if you're on Windows. Desktop browsers will get you there - particularly desktop safari -- although there are enough differences that you should really use one of the simulators
A direct link to one ipad simulator online is: http://ipadpeek.com/
On Windows, Google Chrome is my favorite browser. When I'm done developing a section of the app I do test it on my real device, an HTC desire (Android). As expected, the real device is WAY slower than desktop browser, specially notable on animations, e.g sliding tabs and carousels.
I would say Google chrome is the best browser till date.... and its an ideal browser for sencha touch applications to run, since it contains webkit..
Also you can use Titanium (you can download it here) which has iphone/iPad simulater built in but for that you need a Mac and you also have to download ios sdk.
Working on these simulators is an awesome experience.

Opera Mobile for Windows + Reported Screen Size

I know this isn't a direct programming question, but's it's kinda relevant as I'm trying to get a good testing environment set up before I embark on my latest project.
I'm trying to set up Opera Mobile for Windows to allow me to test a new website. The UserAgent I get is a fairly generic one, so my workaround is to tweak my mobile.browser file to have the correct screen width and height of the target device.
Is it possible to add to the list of "fake" user agents that Opera Mobile for Windows can pretend to be? It currently supports S60, Android and Windows Mobile.
You can modify headers using Fiddler scripts. From the examples at http://www.fiddler2.com/fiddler/dev/scriptsamples.asp, here's a line that might be of particular interest:
Pretend your browser is the GoogleBot webcrawler
oSession.oRequest["User-Agent"]="Googlebot/2.X (+http://www.googlebot.com/bot.html)";
OnBeforeRequest