JBoss.orgCommunity Documentation

Chapter 7. BrowserSim

7.1. Overview of BrowserSim
7.1.1. About BrowserSim
7.1.2. System Requirements
7.2. Features of BrowserSim
7.2.1. Features Overview
7.2.2. View a Web Application on BrowserSim
7.2.3. Manage Web Applications on BrowserSim
7.2.4. Change the Appearance of a Simulated Device
7.2.5. View a Web Page in Different Browsers and Simulated Devices
7.2.6. Generate a Screen Capture of a Simulated Device
7.2.7. Activate LiveReload for BrowserSim
7.2.8. View the Source of a Web Page
7.3. Customizing BrowserSim
7.3.1. Customizing Overview
7.3.2. Make BrowserSim the Default Browser
7.3.3. Add BrowserSim to the Global Toolbar
7.3.4. Set a Shortcut for the Run BrowserSim Action
7.3.5. Add or Modify Devices in BrowserSim
7.3.6. Change the Default Behavior when a Device does not Fit the Display
7.3.7. Change the Default LiveReload Port
7.3.8. Change the Default Location for Saved Screen Captures
7.3.9. Change the Default Settings for Weinre

The overall system requirements of JBoss Tools are applicable for BrowserSim and can be viewed at https://community.jboss.org/wiki/MatrixOfSupportedPlatformsRuntimesAndTechnologiesInJBossToolsJBDS on the JBoss Tools website. But, as reiterated below, there are additional system requirements and restrictions when using BrowserSim on Microsoft Windows operating systems.

BrowserSim depends on WebKit and, consequently, requires Apple Safari to be installed on Microsoft Windows operating systems. Only a 32-bit version of Apple Safari is available for Microsoft Windows operating systems. To work around this restriction for 64-bit Microsoft Windows operating systems, you must set BrowserSim to use a 32-bit JVM when running in 64-bit versions of Eclipse. Note that 32-bit JVM choice is limited to Oracle 32-bit JRE 1.6, JDK 1.6, or JDK 1.7 on Microsoft Windows operating systems because Oracle 32-bit JRE 1.7 is incompatible with Apple Safari.

To set BrowserSim to use a 32-bit JVM, click WindowPreferences. Expand JBoss Tools and select BrowserSim/CordovaSim. Under Select JRE to run BrowserSim, click Select and from the list select a 32-bit JRE or Java developer kit. Click Apply and click OK to close the window.

LiveReload for BrowserSim refreshes web pages open in simulated device browser windows as the source is edited. A LiveReload server sends notifications as resources are changed in the IDE and BrowserSim inserts the JavaScript code, which invokes the simulated device browser window to refresh. The procedures below outline how to create a LiveReload server and how to enable LiveReload in BrowserSim for workspace and deployed resources.

You may wish to preview a web application on a simulated mobile device that is not predefined in BrowserSim. You can add more devices to BrowserSim and modify the existing devices, as detailed below.

To modify existing devices in BrowserSim, right-click the simulated device and click Preferences. In the Devices table, select a device and click Edit. Once you have finished editing the fields, click OK. Click OK to close the Devices window.