Blog

Latest Updates. News. Insights. Ideas.

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. Look here for instructions on how to get the IP address of your system.

    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.

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