Blog

Latest Updates. News. Insights. Ideas.

vivek, Author at Sahi Pro

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

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.

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

Sahi Pro v 4.5.2 – What’s New?

Posted by | features, releases | No Comments

This is a bug fix release

* Features
Added ability to pass extra parameters to Web based Script Runner
* Bugfixes
Fixed memory leak in distributed playback
Fixed problem with session timeout causing “Script did not complete in 150 seconds” error if page does not load within 90 seconds

Sahi Pro v 4.5 – What’s New?

Posted by | features, releases | 2 Comments

Sahi Pro V4.5 released.

Features

  • _maskLogs and _unmaskLogs added to mask sensitive information in logs. More details
  • _addToSession added: Allows adding different domains to a session
  • Added up down arrows to move to parentNode in Controller.
    Parent Finder
    Clicking on the Up arrow identifies the current accessor’s parent element. Clicking the down arrow brings you back.

  • Added threads field in web based script runner.

  • Added ability to copy screen shot images into output logs folder
  • Testcase based reporting enhanced. Pass/fail counts display according to testcases. Navigation improved.
  • Evaluate Expression in flex shows more details.
  • Added logging for miscellaneous functions like _focusWindow(), _takeScreenShot etc.
  • _setFile2 added. Automatically handles js validations.
  • Fixed Java APIs
  • Selenium Java API Support (beta) added.
  • Applet Support (beta) added via _applet API More details
  • Rerouter added for dynamic domain to IP mapping

Bug Fixes

  • Fixed keypress issues in various browsers. This fixes keypress enter _keyPress(el, [13,13]) not working on some browsers.
  • Test case reports show count of testcases instead of scripts.
  • Mixing file and url scripts fixed.
  • Modal from different domain fix.
  • Double commas in SFL metadata fixed.
  • Limiting controller logs length to 100 steps to fix hang issues.
  • Fixed image path of screenshots in logs for Mac
  • handle newlines and spaces in browser_types.xml
  • Flex issues fixed. Horizontal Scroll Bar, NumericStepper, MenubarItem(only using number)
  • browser_types.xml Remove duplicate (x86) from browser path. Also expand $sahiDir.
  • Fixes _takeScreenShot on mac issue.
  • Added _setFile with 3 parameters in Sahi Java.
  • NO_LOG type handled

Sahi Pro v 4.3.2 – What’s New?

Posted by | releases | One Comment

Expand Collapse State in Logs Remembered

When moving from a script log to the script line and back, the state of expand or collapse of logs is remembered.

Controller State Remembered

The state of the Controller is remembered across sessions and even after a Sahi restart. This helps reduce a lot of time spent in setting and resetting the Controller parameters. The last URL entered in the Sahi initial screen is also saved.

New APIs Added

_closeBrowser()
_openBrowser()

_closeBrowser() and _openBrowser() are used to close the browser in the middle of a script and then reopen it later. This can be useful where an application does not allow relogin unless the browser is restarted.

_setXHRReadyStatesToWaitFor($waitStates)

Sahi waits for AJAX readyStates 1,2 and 3. Some applications may have an AJAX request open at state 1 for long periods of time. Sahi should be asked to ignore readyState 1. _setXHRReadyStatesToWaitFor(“2,3”) can be called in this case. $waitStates is just a string of comma separated readyStates (“1,2,3” or “2” or “2,3” etc.).

Store Reports into MySQL Database

Sahi’s reports are stored in a file system based H2 database. For custom reporting it may be necessary to store it into a central MySQL database or another database. Sahi now supports storing reports into a MySQL database. More details Storing Reports in MySQL Database

Upgrade or Downgrade from inside Sahi Pro

To upgrade to a newer version, we have so far had to install Sahi Pro in a different folder and copy over the userdata directory. Now it is possible to directly upgrade from Sahi Pro itself. This will enable faster patch releases for critical bugs and easier maintenance of Sahi Pro.

Bugfixes

  • Fixed bug in reporting large log files
  • Fixed _byText
  • Fixed bug in resizing Evaluate Expression box
  • Fixed IE focus issue
  • Fixed upgrade version comparison bug

Sahi Pro v 4.3 – What’s New?

Posted by | releases | No Comments

New APIs

_focusWindow()
Brings the browser window into focus. This is useful while taking screenshots or using native events.
_takeScreenShot()
Takes a screenshot of the entire screen and adds it to the logs.
_focusWindow();
_takeScreenShot();

Automatically rerun failed scripts

Sahi can create a suite of failed scripts and trigger it at the end of a suite run.
Refer to “Rerunning failed scripts automatically” section here

Trigger testcases from a web interface

We have released the first version of the web based interface for running Sahi scripts.
The web based testrunner allows us to easily trigger testcases on a remote machine running Sahi.

More details here: Web based Testrunner

Syntax highlighting on Evaluate Expression box and Script Editor

Syntax highlighting helps easily see script errors and match brackets in the Evaluate Expression box and Script Editor.

Encode proxy passwords in userdata.properties

Since proxy passwords can be sensitive, we have enabled simple base64 encoding for masking passwords in userdata.properties

Usage:
ext.https.proxy.auth.encrypted=true
ext.https.proxy.auth.password=encrypted_password

You can base64 encode strings here: /demo/php/base64.php

Added missing mx and spark components in Sahi Flex Library

We added support for missing classes from the mx and spark packages

Show custom fields in suite reports

Look at Custom Fields section in Sahi Pro Reporting

Use Properties files when connecting to database

Sometimes it is necessary to pass more than just username password when making a connection to a database.
The _getDB API now can take a Properties file with extra parameters. More details: _getDB

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