While doing automation using selenium, there are certain repetetive tasks that we need to perform in order to handle page elements. So, the aim of this blog is to highlight some common operations that we need to handle every now and then. Some operations are: 1. Open URL in different browsers (Chrome, Firefox, IE) 2. Do mouse-hovers ...
In my Grails app, I came across a requirement of setting up an SMTP server for receiving mails and extracting their content. After exploring a lot I found SubEthaSMTP to be the most suitable. SubEthaSMTP lets your application receive an SMTP mail very easily. To setup an SMTP server in your application, You need to follow the steps as...
Hi, Before writing this blog, I would first like to make you familiar with one quote "Be liberal in what you accept, and conservative in what you send". Yes that's what HTTP robustness protocol states. Scenario : We have a use case where our server need to read XML files that are large containing 400 outer element with extremely...
Recently in one of my project i had a requirement of identifying the class of a property of an object with object class and property name and then determining whether it's an Enum class or not. I found an easy solution for this using Reflection API. Using Java Reflection you can inspect the fields (member variables) of classes. This is...
In one of my recent project, i want to profile method execution time. I have used Spring AOP to profile method execution time. It's very easy to implement AOP profiling in grails 1. Suppose we have below mentioned service class, we want to log execution time of method saveDataStudent,saveDataUpdated methods in service class. We need...
Text Normalization is the process of "standardizing" text to a certain form, so as to enable, searching, indexing and other types of analytical processing on it. Often working with large quantities of text we encounter character with accents like é , â etc. Unicode provides multiple ways to create such characters . For example we can...
To run your Grails application on SSL, firstly you need to configure the Tomcat server. Here in this example, I will show how to configure Tomcat instance and run Grails/Java application. For SSL/HTTPS: We need .keystore file. You can generate it by using command“keytool -genkey”. Run this command on linux terminal or window...
In one of my project, My front end application runs on one server and back end application runs on another. Both application have to communicate with each other through SSL(Secure Sockets Layer). SSL is a way to secure internet communication from your browser to a secure website. The websites using SSL will have https:// to their name. ...
Perhaps, you know it before or just skipped it after going through Java API. But I really found it very helpful at this point. Recently, I had a requirement in an open-source project, where users can iterate through the objects saved in collections (esp. List). But the problem was, we really didn’t want users to directly or...
Hi guys, Recently on a project, I was creating a number of command objects to accept incoming parameters from a POST call from an iPhone with which I needed to sync data. I created a parent class for all command object classes to accept the common properties and created individual command object classes to accept any additional...
Usually, when we deal with databases, we don't face such kind of situation because we query database to get result-set in required order. But let's say you have a List of objects that you want to sort on the basis of two fields. Let's discuss it with an example. I have a list of Tasks (with date and priority fields). I want to sort...
Recently I was working on webhooks (which are getting quite popular for sending notifications to other applications using HTTP POST methods). MD5 encoded content is heavily used in webhooks for security concern. My purpose of writing this blog is neither to explain MD5 nor webhooks. But just to show you - 1. a quicker way in...