Blog

Latest Updates. News. Insights. Ideas.

Sahi Pro v6.0.0 Issues and Workarounds

Posted by | Uncategorized | No Comments

This post shall list known issues and possible fixes. All changes mentioned here will be incorporated in the next version.

Issue #1: Scripts run slower because Sahi waits for uninitiated AJAX requests also
Workaround:
Open
sahi/userdata/config/user_extensions.js
and add
// XHR wait fix start
Sahi.prototype.areXHRsDone = eval("(0 || "+(""+Sahi.prototype.areXHRsDone).replace("null==h||0==h||1==h", "1==h")+")");
// XHR wait fix end

before the line:
__sahiDebug__("user_ext.js: end");

Restart Sahi, clear browser cache before re running scripts.

Sahi Pro V6.0.0 Released!

Posted by | Uncategorized | No Comments

Download Sahi Pro v6.0.0

Sahi Pro v6.0.0 is a major release and contains many new features and bugfixes. The focus of this release is tester productivity enhancement. Some of the key features added are: new Script Editor, better jenkins integration, browser and element level screenshots, APIs for comparing images, better reports, support for globally included global_include.sah file and many more.

Full details of all changes and enhancements can be found here: What’s new in Sahi Pro v6.0.0

Play with it today and let us know if you like the new features!

Is This Your Automation Story? – From the “NEED” to “SUCCESS”

Posted by | Sahi | No Comments

Your product simplifies business critical workflows for banking organizations. Your product has complicated workflows which are accomplished by navigating through various forms and screens of your web application. Currently you are doing a lot of manual testing. You have testers who understand your domain well and are good at identifying problem areas. These testers are not programmers, but use computers to get their job done.

Sometime back you moved to faster releases. The development could cope with it (or so they believed and claimed). But testing started lagging behind. You realize that a lot of time is spent verifying older functionality. So you start skipping some parts of it. One day your friendly customer calls and says, hey, I am no longer able to edit loans as a manager. A CRITICAL BUG! Your mature, smart testing manager resists the temptation to shift blame (thank god for that!). You discuss with her and realize the manual testers are overwhelmed by the speed of releases. Bugs are slipping through and they are frustrated.

The NEED:

You realize YOU NEED AUTOMATION. And that you have no clue how to go about it.

So you ask your testing head. She says she knows this tool which she has seen used in an earlier organization. You look at the cost and blanch. You still go ahead and evaluate it. You think you will just have one tester on automation then. The testers are able to understand the tool and work with it. Unfortunately it does not support some components on your web application. You are silently relieved that you did not have to justify such a cost and make the compromise of using just one automation tester!

The EXPERIMENTING:

Next you ask one of your developers. He has heard a few things and suggests that you go with product B. You ask him if he has used it. He says, he has not, but EVERYONE seems to be using it. Many of the bigwigs are using it too. It is open source and free too! Wow! – you say. Let’s try it. The testing head is a little cautious. You are mildly irritated with her and assign the developer to do a Proof of Concept. The first trivial demo goes through. The enthusiastic developer blogs about it. He then goes on to do the POC. He needs to demo it in 2 weeks.

Demo day. You see your application run automatically through a flow on Firefox. You are impressed and happy. Now your developer takes you through the code behind it. You see code. Lots of it. In Java. And cryptic long strings as identifiers. Lots of code with JavaScript expressions as strings. This seems complicated. You worry now. Can your testers do this? You ask if it runs on Internet Explorer 9 where your customers are. The developer says the tests seem to freeze up and crash and he suspects some bug in his code which he will fix. The testers want to try their hand. Install Eclipse he says. They have never used an IDE. They are excited with the new toys. The developer is surprised they don’t know Java and are staring at him blankly when he asks them to write a TestNG test. He explains and a few testers nod. He goes on to identify elements using the developer toolbar and does some copy pasting of xpaths etc. XPath? What is that asks the tester. He explains, but is starting to get frustrated. They seem to know nothing he thinks. “Can’t we use a recorder to build our tests?” asks a tester. Since the product does not have a recorder, the developer goes on to justify it that recorders are bad and you should always code. You sense that it is a cover up for a deficiency, but wait to watch how this plays out. Especially since you like the developer and don’t want to bruise his ego (little sensing how much you will regret this later). You allow the game to be played for a couple of more weeks. You think this may help the testers also scale up some skills.

A couple of weeks later, you talk to the team. The testers say they have not been able to automate much. The developer says they do not have the skillsets. You should hire automation engineers. You try out with two automation engineers. They don’t come cheap. They seem to love XPaths and adding waits and digging deep into browser developer tools. But one of them seems to not understand the business functionality. He even has a holier than thou attitude, as if testers who understand business, but cannot automate like him, are beneath him. The other one thankfully is saner. Both diligently dive in to create a “framework”. Your existing testers are getting demotivated. They fear they may be fired. You are getting frustrated too. You think maybe you should outsource this. You talk to a few vendors. They say they know the tool but you will need a framework. The framework will cost you thousands of dollars and a few months of effort. Automation can only start after that. You start budgeting for it. But you are worried. What will I do with my current testers? This all seems unnecessarily complicated. You sense that YOU ARE SOLVING TECHNICAL AND PEOPLE PROBLEMS INTRODUCED BY A TOOL RATHER THAN YOUR OWN BUSINESS PROBLEMS.

Thankfully, you talk to your friend who heads engineering in that clinical research company in the US. He tells you about another tool. A tool which has enabled his existing testers to automate. A tool which does not need XPaths or waits. A tool which has a good recorder. A tool which has inbuilt technology to ease every bottleneck you yourself have encountered so far. And a tool which works reliably across browsers. Fast. Even on Internet Explorer, which you have not been able to reliably run on yet with tool B. (Tool B’s fan boys kept blaming that IE is cr*p and is slow). And he raves about the support team which has bailed him out every time. They even shipped an entire new build in 3 days for one of his issues.

The SOLUTION:

So you change track. You ask your tester to evaluate this tool. It is called Sahi Pro. She schedules a demo from the Sahi team. She asks lots of questions. She does a screen sharing of her application and the Sahi team demonstrates how to automate it. She finds it easy. She does not know yet about running it in suites, distributing it across machines, taking screenshots, integrating with Continuous Integration systems etc. But she need not worry. Everything is inbuilt into Sahi Pro. The developer went through Sahi Pro’s documentation and found that it covers all of this. And your friend said it works too.

SahiPro-test-automation

The SUCCESS:

You are happy. You are happier to know its cost. And the fact that it allows flexible licensing. It all makes perfect business sense. Your developer who was handling automation is back to development. He was frustrated with the brittleness of the tests and having to interact with non-programmers. He is happy to go back to doing fun creative coding. His first love. The testers have automated a lot of scenarios now, especially with Sahi Pro’s inbuilt framework. One of the automation engineers who was hired is a little disappointed that he did not get to develop his own framework. He has applied for developer jobs elsewhere. The other automation tester has gone back to do what he loves – exploratory testing of complex business scenarios, while his automated tests verify known paths and regression scenarios reliably…

OpenSSL and Heartbleed clarification in Sahi Pro

Posted by | Sahi, technical | No Comments

One of our support requests asked about the version of openssl used in Sahi Pro. Since it may be of concern to others, here is some more information related to use of openssl in Sahi Pro.

The version of openssl is :
OpenSSL 0.9.8h 28 May 2008

OpenSSL 0.9.8h did not have the heartbleed bug. (“OpenSSL 0.9.8 branch is NOT vulnerable” from http://heartbleed.com/)
In Sahi, Openssl is only used to generate a signed certificate with Sahi’s CA certificate (also created via openssl).
All other HTTPS communication between browser proxy and server are done via Java’s built-in SSL implementation.
Sahi does not add its version of openssl into the system path, so it should not affect the rest of your system/application.

Sahi Pro v5.1.1 fast execution without waits on Chrome 34

Posted by | Sahi, technical | No Comments

Some of you may have noticed that Sahi Pro does not wait correctly for page loads since Chrome 34. This happens because of a change in window.document.readyState behaviour in (since?) Chrome 34.

To fix it, do the following:

Open sahi/userdata/config/user_extensions.js and add

// Chrome 33 fix start
Sahi.prototype.replace33 = function(fn) {return "("+(""+fn).replace("_isChrome", "isChrome33Minus")+")";}
Sahi.prototype.areWindowsLoaded = eval(_sahi.replace33(Sahi.prototype.areWindowsLoaded));
Sahi.prototype.ping = eval(_sahi.replace33(Sahi.prototype.ping));
Sahi.prototype.getChromeVersion = function() {
var m = window.navigator.appVersion.match(/Chrome\/(\d+)\./);
return m ? parseInt(m[1], 10) : 0;
}
Sahi.prototype.isChrome33 = function() {return this._isChrome() && this.getChromeVersion() == 33;}
Sahi.prototype.isChrome33Minus = function() {return this._isChrome() && this.getChromeVersion() <= 33;}
//Chrome 33 fix end

before the line:
__sahiDebug__("user_ext.js: end");

Restart Sahi, clear browser cache and check if it works. If you have trouble, please email support.

Sahi Pro V5.1.0.0 – What’s New?

Posted by | Uncategorized | No Comments

Download Sahi Pro v5.1.0.0

Sahi Pro v5.1.0.0 is a major release and contains many new features and bug fixes. Some of the key features added are IE 11 support, CORS support, data driven suites, email notification, scenario editor for Excel framework, Sahi as a documentation tool and ability to launch multiple browser sessions in a single script. We have also added brand new documentation. A complete list of features incorporated into the release, bug fixes made, integrations possible etc., can be found here: What’s new in Sahi Pro v5.1.0.0

Sahi Pro V5.0.9 – What’s New?

Posted by | Uncategorized | No Comments

Download Sahi Pro V5.0.9
This is a bugfix release.
Below is the changelog:

26 August 2013
----------------
Sahi Pro V5.0.9 released.
This is a bugfix release.
* Bugfixes
	Fixed: IE renders correctly depending on X-UA-Compatible for ie meta tag
	Fixed: Cookie value containing extra trailing comma issue
	Fixed: Setting UserDefinedId from inside a script.
	To set the userDefinedId from inside a script, use the following code
	ScriptRunner.getSession().getSuiteInfo().setUserDefinedId("sampleid");
	Fixed: For Ajax requests, Sahi will return a 401 response by default, instead of returning a custom 401 page with 200 status.
	To change the behavior, add xhr.return_401_response=false in userdata.properties.
	Fixed: parser bug where switch statement immediately following a case statement was ignored
	Fixed: parser bug where function.bind was causing classcast exception
	Fixed: parser bug to handle unary operators in statements; like _click(_link($i++))
	Fixed: Missing dload.sh added
	Fixed: Correctly showing error in logs if path is wrong while running from suite from testrunner.
	Fixed: Screenshot comparison logs in IE9
 

Sahi Pro V5.0.8 – What’s New?

Posted by | Uncategorized | No Comments

Download Sahi Pro V5.0.8
This is a bugfix release.
Below is the changelog:


Sahi Pro V5.0.8 released.
------------------------
This is a bugfix release.


* Bugfixes
Fixed Flex for chrome and firefox
Fixed support for input events on IE - fixes angularjs problems
Fixed identifying elements across iframes from same domain but different from parent domain
Fixed _in so that it does not look for elements in frames outside of the reference element
Fixed slow running of drun tests when H2 database is very large. Added index.

Sahi Pro V5.0.7 – What’s New?

Posted by | Uncategorized | No Comments

Download Sahi Pro V5.0.7
This is a bugfix release.
Below is the changelog:


Sahi Pro V5.0.7 released.
------------------------
This is a bugfix release.


* Bugfixes
Fixed Excel Framework reports
Fixed Excel Framework loadSahi script using _include
Fixed _dragDrop waits for full drag drop
Fixed bug where step starting with tab in Controller Evaluate Expression throws error
Fixed code folding related bugs which caused some Object methods to be skipped or incorrectly processed
Fixed NullPointerException in PacProxySelector
Fixed Origin request header not being sent to server: Set sun.net.http.allowRestrictedHeaders=true by default
Fixed parsing of E4X code in Sahi Script
Fixed automatic scroll up bug in Controller in some IE versions

Fixed Wrong screenshot associated with previous step
Fixed AltDblClick brings controller into focus
Fixed popup prefix when identifying flex objects
Fixed data base issue for MySQL on linux
Fixed slow loading of web based testrunner

Sahi Pro V5.0.5 – What’s New?

Posted by | Uncategorized | No Comments

Download Sahi Pro V5.0.5
This is a bugfix release.
Below is the changelog:


11 June 2013
----------------
Sahi Pro V5.0.5 released.


* Bugfixes
Fixed switch case null pointer exception when there are no statements in case
Fixed _takeSnapShot. Behaves same as _takeScreenShot
Fixed: In reports, clicking on log statements points to corresponding _log step


* Features
Added _hr API to identify html HR tag.
Added browser method sendHTMLResponseAfterFileDownload(b) in java driver

Sahi Pro V5.0.4 – What’s New?

Posted by | Uncategorized | No Comments

Download Sahi Pro V5.0.4

This is yet another quick bugfix release!

Below is the changelog:


10 June 2013
----------------
Sahi Pro V5.0.4 released.

This is a bugfix release.

* Bugfixes
Fixed Code folding for functions used as constructors
Fixed switch case parsing when case has a scope ({}) instead of a single statement
Fixed Mailer: addRecipient used for multiple to addresses
Removed Mailer SSL port hard coding
Fixed recursive includes leading to StackOverflowError
Fixed setting external proxy configuration (was broken since 5.0 after adding proxy.pac support)

* Features
Added _object to identify html tag object.

Run Sahi script on iPad

Posted by | Uncategorized | No Comments

Sahi can be used for testing the fluid nature of web apps and its functionality on different devices. In this post, we will be looking into running Sahi scripts on iPad. Before I go ahead and mention how to do this, there are few important notes about this kind of execution:

  1. You can’t install Sahi on iPad. Sahi must be installed and running on a different computer in the same network.
  2. The scripts which will be executed on iPad will not be recorded on the iPad. These scripts will be recorded on the computer itself, by resizing the browser and changing the user agent to iPad.
  3. Only the playback will be done on the iPad to check if the web app renders correctly on iPad or not.
  4. The scope of this post is only related to playing back a script on iPad. A different post will come up with the steps required to record scripts for different devices.

With these points in mind, let’s move ahead and configure our iPad for the run. While following these steps, please note that you need to use the IP address of the machine on which Sahi is running (and not the IP I am using, that is of my own machine).

  1. To start configuring the iPad, click on the settings icon on the home screen.

    1

  2. This will open the general settings option panel. Click on the network tab:

    1

  3. This will show all the network options that are present for connection. In the wi-fi settings click on the network that is being used by both the iPad and the machine running Sahi. I am using Tyto_24 so I will click on the arrow button next to it.

    1

  4. This will open the settings for that particular network and show a bunch of details about the network. What we are interested is the proxy for the network. In case you are within another proxy, such as your corporate proxy, you need to make changes in the Sahi installed in your machine. Let us click on the manual button of proxy.

    1

  5. This opens up the settings panel for the proxy. The two fields which we are interested in are the proxy and port. We need to set these ports to our computer running Sahi on port 9999 so that the iPad can use the Sahi on the machine to run the scripts.

    1

  6. Set the proxy to the IP address of your machine.

    1

  7. Also set the port to 9999. This will ensure that it is going to route through Sahi installed and running on the machine.

    1

  8. Configure Safari to accept cookies always:
    Settings -> Safari -> Accept Cookies = Always
  9. Now open a Safari browser and go to the URL http://192.168.1.70:9999. Replace the IP with your own machine IP. This will open the Sahi page for running script on mobile. This is similar to the playback tab of the controller where you can provide the script name and start URL for the run.

    1

  10. Provide the name of the script at [1], the start URL at [2] and then click the run button [3].

    1

  11. As you click the run button, you can see the page navigating away to your script run and your script will be executed now.

    1

    The reports for this script will be available on the machine on which Sahi is running.

Sahi Pro V5.0.3 – What’s New?

Posted by | Uncategorized | No Comments

Download Sahi Pro V5.0.3

This is yet another quick bugfix release!

Below is the changelog:


30 May 2013
----------------
Sahi Pro V5.0.3 released.

This is a bugfix release.

* Bugfixes
Fixed recording of elements which have index as their first identification attribute
Fixed java.awt.Robot references which cause PhantomJS scripts to fail on linux machines without X Windows
Fixed handling of negative values in _xy() API
Fixed fetch API in ruby driver to handle both attributes and chained attributes (like rows.cells.length)
Fixed Assertion selection in Java Controller
Fixed code folding logs when functions are declared inside included files
Fixed Controller pause/step buttons. Removed current step, next step counters.
Fixed showing _wait statements in Controller.
Fixed display of time when time taken is more than 24 hours (prettyTimeMoreThan24Hours added and exposed in XSLUtils)
Fixed Recorded Steps not showing correctly in Controller
Fixed HTML reports not showing browser name when run via testrunner or Controller.
Fixed remembering "Record" button state
Fixed issue of Controller content opening on main window with blank Controller on some versions of IE

* Features
Added openWindow API in java driver to launch in different resolutions
Added _sahi.isReadyForStepDefault. This is called from _sahi.isReadyForStep which can be overridden to add custom waiting conditions.
Added JSDoc comments to apis.sah for auto-complete help in editors like Eclipse

Sahi Pro V5.0.2 – What’s New?

Posted by | Uncategorized | No Comments

Download Sahi Pro V5.0.2

This is another quick bugfix release. Sahi Pro V5.0 has a lot of significant changes to improve overall usability and performance. This also meant that we sneaked in a few bugs. Thanks to our customers to have reported bugs in the 5.0.1 release made just yesterday and helping us come out with v5.0.2!

Below is the changelog:


16 May 2013
----------------
Sahi Pro V5.0.2 released.

This is a bugfix release.

* Bugfixes
Fixed "return" statement parsing bug
Fixed testrunner for singleSession=true threads=1
Fixed JS error alert in Controller during Java playback
ignorable_ids applied only on ids. Added zk pattern
Ruby Sahi: Added support to identify elements using multiple attributes via hash
eg @browser.textbox({"name"=>"q","sahiIndex"=>2}).

* Features
Added ability to show/hide Base Url and User Defined Id based on flags in Suites List
Set XSL param showUserDefinedId to true in suites_list.xsl to show the User Defined Id
Set XSL param showBaseUrl to true to show the Base Url

Sahi Pro V5.0.1 – What’s New?

Posted by | Uncategorized | No Comments

Download Sahi Pro V5.0.1

This is a bugfix release with the following changelog:


15 May 2013
----------------
Sahi Pro V5.0.1 released.

This is a bugfix release.

* Bugfixes
Fixed "switch" statement parsing bug
Fixed Run button from mobile user interface (launch.htm)
Fixed browser type detection (launch.htm)
Fixed suite inside suite bug when start url is specified along suite.
Fixed web based testrunner to run scripts from custom paths configured via scripts.dir

Sahi Pro V5.0 – What’s New?

Posted by | releases, Sahi, Uncategorized | No Comments

Download Sahi Pro V5.0

Major Changes:

Detached Sahi Controller
The Sahi Controller is no longer tied to the same domain of the webpage that is being automated. This fixes two problems: 1) multiple controllers opening up when navigating between domains/popup windows and 2) Controller not responding to some parts of the web page

External Proxy Configuration using proxy.pac file
Many organizations use a separate proxy.pac file to configure their complex proxy rules. Sahi now can be configured to use a proxy.pac file instead of a hardcoded external proxy.

Added support to specify suites inside a suite
Suites can now be included inside other suites, allowing easier management of suites.

Script parsing done via Rhino AST parser
Sahi has moved from its previous string based parsing to Rhino’s AST parser. This allows formatting Sahi scripts in similar ways as normal Javascript files. For example, multiple actions can now be written on a single line.

Parallel browser launching enabled from java driver
Multiple browser instances can now be launched using new Browser() instances. Previously this would cause clashes in browser profiles, which has now been fixed.

_setValue bug fixed for firefox 20+
We feel stupid, but the problem was that Firefox 20 was being identified as Firefox 2 by Sahi, and hence falling back to Firefox 2′s event simulation mechanism. (Who anticipated Firefox 20 within 2 years?!) This has now been fixed.

Java 1.7 – Browser opening bug fixed
Browser launching was broken for people who moved to Java 1.7. We have fixed this now.

Proxy Configuration bug in IE10 x86 version Fixed
The proxy would be set and unset immediately on IE10 x86 version. This has now been fixed. Similar issue with Safari on Mac also is fixed.

Reporting Mechanism Optimized
The previous implementation stored execution steps in memory till the end of a script and then wrote to the database. In case of long running scripts, the memory requirements became large and if there were any OutOfMemoryErrors, the script would terminate without any logs, causing frustration and wastage. From this release, the logging is done directly to the database at each step itself, so there is no memory accumulation. Even if scripts abort in between, the logs are available till the last executed step.

Minor Changes:

Allow playback of scripts without refreshing page (“Use Start URL” checkbox added)
It has been a long time complaint from our users that Sahi refreshes the page before executing a script. We have now made this optional via a checkbox. If unchecked, the script can be set and played back without reloading the page.

Make Streaming configurable
To accommodate technologies like Comet and Server Push, we have added streaming_contenttypes.txt and streaming_urls.txt which specifically tell Sahi to stream the content without buffering.

Added Diagnose link to Dashboard
If a Sahi script waits for a long time without executing the next step, one can click on the Diagnose link on the Controller to dump the state of playback. It helps diagnose problems with Sahi indefinitely waiting for AJAX activity to subside.

Added Sahi version to Dashboard

Added feature to set java path automatically during installation of Sahi

Added setFile2 API to Sahi Java

Added Start URL in reports

New APIs added:

  • _verifyLayout: Allows verification of Page layout
  • _readLayout: Reads a simple csv like file of Sahi Elements and converts it into 2D array to be consumed by _verifyLayout
  • _includeOnce: For complex nested scripts, allows including library files only once.
  • _openWindow: Opens a new window at given resolution. Helps testing responsive layouts along with _verifyLayout
  • _windowAction: Used to perform maximize, minimize, focus, refresh, restore and close window on Windows

Download Sahi Pro V5.0

Complete Changelog


07 May 2013
----------------
Sahi Pro V5.0 released.

* Features
Parallel browser launching enabled from java driver.
Added Start URL in reports
Updated the API list for Notepad ++ plug-in.
scrollOffsets added to mouse events
Added setFile2 API to Sahi Java
Added diagnose link to Dashboard
Added Sahi version to Dashboard
Script parsing done via AST parser.
Added _windowAction API which can be used to perform maximize, minimize, focus, refresh, restore and close window
Added feature to set java path automatically during installation of Sahi.
User Agent added to initialized.htm
Added support to specify suites inside a suite.
Support provided for Microsoft SQL database.
_verifyLayout and _readLayout API created
Make Streaming configurable; added streaming_contenttypes.txt and streaming_urls.txt
_includeOnce API added
_openWindow API added
proxy selector with pac file
Allow playback of scripts without refreshing page ("Use Start URL" checkbox added)
Detached Controller implemented to allow easy recording via multiple domains/windows without opening multiple Controller windows
New playback mechanism using ping

* Bug fixes
Fixed identification of divs where each text is encapsulated by 2 divs
Fix for very slow performance of removeComments. Fixes slow loading.
Log Exception takes to the correct line number in script.
Script parsing error reporting fixed.
Fix _under in IE.
_under and _above fixed to take offsets on both sides
Mysql logging fixed
.js files fixed to be treated as single .sah file instead of .suite
HAR logging fixed
changes to terminate a load test, if the capacity is exhausted on all nodes
Fixed "Test->" assert of multiple lines from controller
Dsync fixed to copy scripts to nodes from master if master is not in list
Update of suite reports result in dload fixed
_setValue bug fixed for firefox 20
Suite report time taken format changed
fixed: reports dumped to FS
database table creation fixed
load runner fixed
Status and graph for drun fixed
drun logs for suites fixed
leftOf, RightOf fixed
domanifix with 2 parameters fixed
Fixed reports for csv based suites
test case reporting fixed
_takeScreenShot fixed
Linux certgen problem fixed

Download Sahi Pro V5.0

Testing responsive web design

Posted by | features | No Comments

Understanding responsive web design

When web content was primarily consumed through laptops and desktops, web sites were designed, developed and tested for handful of screen resolutions such as 800×600, 1024×768.

With advent of mobile operating systems such as iOS, Android, Windows 8 and BlackBerry 10, device manufacturers are rolling out different models of smart phones and tablets. Web content is being increasingly consumed using these smart phones and tablets. Screen size of these smart phones and tablets not only varies from one device model to other but also from one device manufacturer to another. Varying screen sizes among smart phones and tablets, create challenge for web designers, developers and testers.

Responsive web design is a user interface technique used by designers and front end developers to create adaptive web pages. These adaptive web pages will automatically change their design and layout to fit across different screen sizes (often of different devices).

Example of responsive web design

In this example we will look at a web page created using responsive web design technique. Below images show different view of same webpage across different screen size.

Webpage on Tablet Webpage on Mobile

What to test?

In responsive web design, when screen size changes, there will be an impact on following elements,

  1. Page Layout
  2. Visibility of elements
  3. Position of visible elements
  4. Size, color of visible elements

By asserting on visibility, css properties and position of elements, we could validate design and functionalities of a web page, across different screen size.

How to test?

  1. Resizing browser window
    • Load web page in a browser and resize the browser window to prefered screen size. Manually resizing browser window to specific size would be difficult and error-prone. We could use “window.open” javascript api to set window size & load the web page.
  2. Using firefox developer tools
    • Go to “Tools” > “Web developer” > “Responsive Design View”, set prefered screen size and load the web page.
  3. Device emulators/simulators.
    • Android & iOS development environment comes with device emulators/simulators. Android emulator allows us to set device resolution. Web pages can be loaded and tested on these emulators/simulators.
  4. Actual devices.

Automtaion using Sahi

Sahi pro has many capabilities that will make testing of responsive web design across different screen sizes & devices, easy & elegant. Register below for free webinar (April 2013) on testing responsive web design using Sahi pro.

This webinar has expired

Use fully-loaded Sahi Pro FREE for a month. Download Now Request a Demo