Blog

Latest Updates. News. Insights. Ideas.

April 2017 - Sahi Pro

Sahi Pro V7.0.0 Released!

Posted by | Uncategorized | No Comments

Download Sahi Pro v7.0.0

This is a major release. Sahi Pro v7.0.0 is major rewrite of Sahi Pro. It was required to allow support for technologies other than web.

Sahi Pro Desktop Add-on has been introduced which supports Windows and Java technologies.

Please have a look at What’s new in Sahi Pro v7.0.0 for details. Please do not upgrade without reading the above documentation, since some changes may break your existing scripts.

Sahi Pro Chrome 58+ SSL certificate fix

Posted by | Uncategorized | No Comments

NOTE: Post modified on 5 May 2017 with updated patch.

Chrome 58 has introduced a check for Subject Alternative Name in SSL certificates. Sahi Pro’s certificate creation mechanism did not support this, causing https sites to fail on Chrome 58 (and higher).

The error seen on Chrome is ERR_CERT_COMMON_NAME_INVALID

Our initial patch released on April 22nd 2017 fixed it, but sites with IP addresses and domains which started with number in any of its components were still failing (for all browsers). This patch fixes these issues.

To fix both these issues, download the sahi_ssl_chrome_58_domain_number.zip file, and follow the instructions in the README.txt file.

This patch can be applied on Sahi Pro v6.3.2 and Sahi Pro v7.0.0

Fetching multiple elements? _collect APIs to your rescue.

Posted by | Sahi, technical, tutorials, web automation | No Comments

There are multiple cases in automation where you would like to fetch multiple elements. In such cases, you can use any of the three APIs – _collect, _collectAttributes and _collectElementsInfo.
Let us see each API in detail.

_collect:
This API returns an array of element stubs of all elements of type apiType matching the identifier within relations.

Syntax:
_collect($apiType, $identifier[, $relations ...])

$apiType string type of elements to collect. Eg. "_link", "_button", "/text/" etc.
$identifier string|int Sahi Identifier. Can also be just an index.
$relations … relations optional Relations like _in, _near etc.

The next API to check out is _collectAttributes
This returns an array of element attributes of all elements of type apiType matching the identifier within relations.

Syntax:
_collectAttributes($apiType, $identifier, $attribute[, $relations ...])

$apiType string type of elements to collect. Eg. "_link", "_button", "/text/" etc.
$identifier string|int Sahi Identifier. Can also be just an index.
$attribute attribute|function attribute or function.
$relations … relations optional Relations like _in, _near etc.This can fetch

This API can fetch

  • a simple attribute from multiple elements
  • one of the few simple attributes from multiple elements
  • some synthesized/processed values from multiple elements by executing
    • an inline function for each element
    • a defined function for each element
    • nested functions

The third API to note is _collectElementsInfo
This API returns array of Accessor Info object of all elements of type apiType within relations.

Syntax:
_collectElementsInfo($apiType[, $relations ...])

$apiType string Type of elements to collect. Can be regular expression. Eg. "_link", "_button", "/text/" etc.
$relations … relations optional Relations like _in, _near etc.

To know more about Fetch APIs, please refer this link: http://sahipro.com/docs/sahi-apis/fetch-apis.html

Feel free to write your questions to support [at] sahipro [dot] com

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