Monday 29 August 2016

How to read QR Code or Barcode from Images

Reading Barcodes / QR codes from images seems to be difficult & using the below open source libraries(ZXing - Zebra Crossing) provided by Google will make it simple for any application to include this functionality.

Curious on knowing how Android Apps scan the Barcodes or QR codes from the camera?

The android apps designed to scan 1D & 2D barcodes on a high level convert the data the camera into image bytes to the below library, which in-turn return the data embedded within the bar codes.

Follow the below steps to achieve the same.

Friday 26 August 2016

Test REST Web Services using REST Assured API

REST Assured(RA) is a framework built on Java developed to test the REST services. It supports any HTTP method but has explicit support for GET, POST, PUT, DELETE, HEAD, OPTIONS, PATCH and includes specifying & validating like Headers, Cookies etc.

RA has inbuilt support for multiple authentication like BASIC, OAuth, OAuth2, Form, Certificate, Digest, CSRF (Cross Site Request Forgery) etc.

RA out of the box has the support for BDD approach.

Follow the below steps to configure & test the REST web services.

Tuesday 16 August 2016

Text To Speech Using Voice RSS API

RSS Feeds are well known in the internet world. The new Voice RSS service brings the Speech Synthesis to a new level, where one can get the benefit of this feature with its Cloud Based Solution [SaaS] which requires no installation, no dependency on the technology, fast and accessible at all times.

Voice RSS exposes the Web Service / API to convert the given text into speech. 
Follow the below steps.

Friday 12 August 2016

Convert Text to Audio using FreeTTS

Converting a text to audio may have multiple use cases in automation like creating the audio files for any data feed, voice driven tests etc.

FreeTTS[Free Text To Speech] is a library based on Java Speech API which is built on core technologies like Speech Synthesis and Speech Recognition.

Follow the below steps to configure & code to CONVERT TEXT TO AUDIO

Wednesday 3 August 2016

Handle Windows Authentication Dialog in Automation - Selenium WebDriver

Windows Authentication dialogs are common when we are working in ODC environments.This would cause initial hickup for automation as the authentication pop-ups are out of DOM structure. This can handled in several ways like AutoIT, Sikuli, etc.

Below is one of the simplest way to handle.

Tuesday 2 August 2016

Launch Browser with Extensions - Webdriver


Launching the selenium webdriver, by default opens the plain browser without any extensions.
But there is way, to launch the chrome browser along with the pre-installed extensions.

To load any chrome extension in webdriver, we need to package the extension to .crx file & refer the same file in the desired capabilities / chrome options to load when the browser is launched.

Follow the steps mentioned in the below link to create .crx file.
https://developer.chrome.com/extensions/packaging

Refer the *.crx file path in your code & launch the browser.

Launch Selenium Browser in Emulation Mode or Mobile Mode


Responsive Design Websites are the hot website design in recent days which fits to all device resolutions. Testing the responsiveness of the website on multiple resolutions is very important.

In the absence of real devices or if the application is in development mode, one can launch the selenium browser in mobile/emulation mode by setting the desired capabilities.

Below code snippet would help in launching the browser in emulation mode.
NOTE: This option is very good alternative for Emulators while testing web-app responsiveness.