What is new in Sahi Pro v7.5.0
abstract
Sahi Pro v7.5.0 is a major release with significant feature additions and modifications. The following summarizes features and enhancements in Sahi Pro v7.5.0.
Key Features
warningRead this section, before upgrading to Sahi Pro v7.5.0
- Sahi Framework now supports Java: Sahi's Framework previously supported calling Sahi script (Javascript) functions. Now Scenario files can call Java methods. This should help teams which want to use Java instead of Javascript for automation. APIs _importJava and _loadJavaInstance have been added to enable calling Java libraries from Sahi scripts.
-
Sahi specific assertions in Java driver:
Assertions in Junit etc. do not have the wait and retry mechanism which is available in Sahi's javascript assertions.
Also junit assertion failures cause Java tests to abort.
Now assertion APIs have been added to Java driver with implicit wait-retry mechanism. When these assertions are invoked from Sahi scripts or Scenario files, assertion failures do not stop execution. Also logs are automatically generated.
When using with a junit like framework, callingb.throwExceptionOnAssertionFailure(true)
will ensure Exception is thrown during failures. - Create Accessor Repository from existing scripts: If scripts have already been created, and you now want to start using Accessor Repository, it is now possible to extract accessors from existing scripts into Accessor Repository files easily from the Editor.
- Password Encoding: Previously, passwords used to be recorded as is, making passwords easily visible to others. This can be a concern in specific cases where real credentials are needed for accessing your application. _setPassword, _encrypt APIs have been added and Editor now has a Password Encoder utility. Please note that the encoding makes it slightly more complex to know your password, but is not very secure.
- Desktop Automation without Browser Automation: If you want to automate only Desktop applications, and do not need Sahi Pro's browser automation capabilities, it is now possible to turn off browser capabilities and use only a Desktop Add-on license (without needing a Sahi Pro license).
- Support for OAuth2 in REST automation APIs
- If Sahi Pro license is expired, Sahi Pro will be disabled but user can continue with Sahi Pro Runner of the same version.
- Auto-completion of words as user types in the Editor
New APIs
- _importJava: Creates a new instance of the Java class and sets it into a presumed variable name.
- _loadJavaInstance: Returns an instance of the Java class.
- _setPassword: Decrypts and sets the password into the element.
- _encrypt: Returns encrypted password string.
- _getSessionId: Returns session id of current script.
- _isEnabled: Returns true if element is enabled, else false.
- _expectPrint: Sets expectation for print statements. Script can be failed for unexpected print calls.
- _expectAlert: Sets expectation for alert statements. Script can be failed for unexpected alert calls..
Modified APIs
- _setFile: Modified to escape special characters in action url.
- _setFile2: Added support for Javascript validations and submission of file contents
- _compareImages: Fixed for non BROWSER modes also. Fixed default threshold value.
Bug Fixes
- Java Controller: Fixed assertions.
- Fixed: _setLanguage API (Language translations were not working in scenario files)
- Fixed: _takePageScreenshot API for elements with Fixed Position.
- Fixed: _position API for elements with Fixed: Position.
- Fixed: _dragDrop with datatransfer object.
- Fixed: _fail with email report was throwing exception.
- Fixed: _renameFile when both old and new files are same and existing, Sahi was deleting the file.
- Editor - Playback status messages were not appearing, if the status message box is closed.
- Editor - Fixed: alt+O alt+N alt+2 shortcuts were deleting contents of focused cell value in scenario files.
- Editor - Fixed: In dd.csv Alt+N was opening a new worksheet, but URL header was not present.
- Editor - Fixed: On adding more then 10 column in spreadsheet without header tag, only upto 10th column is visible.
- Editor - Fixed: Reading excel with referenced book.
- Editor - Fixed: Create function is escaping dollar ($) if more than one dollar is present in actual parameter.
- Editor - Fixed: In Scenario Editor, on adding "////" as comment instead of "//" before function call, Sahi was commenting entire test case and skipping to next test case. Thus, ignoring the next function calls made in the test case.
- Editor Search and Replace- Fixed Search for handling special characters.
- Controller - Fixed: On recording script with .js extension, .sah extension was appending with the script name.
- Controller - Fixed: On opening SCRIPT EDITOR from record tab, if script's extension is .js, File Not Found error was coming on editor.
- Controller - Fixed: On selecting Click action from the drop-down below Evaluate Expression text area, click statement was not appearing in result text area.
- Controller - Fixed: Evaluate Expression was not working if the script was paused.
- Controller - Fixed: Recording and identification for ShadowDom v1. Added "browser.shadowdom.chrome.optimize_for_version" property in
/config/sahi.properties, which will be used to find elements based on its value in chrome browser. - Recording - Fixed: with _openWindow: Sahi was not recording resolution of browser window.
- Configure - Fixed: ctrl+Z was changing the whole contents of current page with the contents of previous page.
- Reports - Fixed: Added DEBUGINFORMATION to STEPREPORTS in Sync reports.
- Mobile Playback - Fixed: Mobile Playback was not happening because of time difference between client and server.
- Logs - Fixed: On comparing logs in reports, suiteId list was overlapping suite summary table.
- Logs - Fixed: DEBUG INFO: If script is executed in one machine, and logs are accessed from different machine, Sahi was taking script path of the machine where execution happend. Hence, if clicked on step in log, File not found was coming.
- Fixed: File download for files with filename more than 255 characters.
- Fix for Safari(Mac) intermittent connection failure when performing SessionState_ping. Introduced a delay before socket closure. This delay can be configured from sahi.properties.
- Fixed CodeCoverage Instrumentor. IF-ELSE not instrumented correctly if we use if-else without braces.
- Fixed: Close the browser launched from _launchNewBrowser after suite end, in single session.
- Fixed: For Java/Windows mode, if script failed because of 90 sec error, Sahi was not taking screenshot.
warning
Refer Whats new in Sahi Pro Desktop Add-on v7.5.0 for features and enhancements done in Sahi Pro Desktop Add-on v7.5.0.