Posts

Showing posts from 2013

Selenium: Handling NoSuchElementException

Seleniuim throws NoSuchElementException when it can't find the element on the screen. This blog lists down the scenarios and strategy to handle them. Element is hidden by an overlapping <div> This is the easiest to resolve. In case, there's a lightbox, create an action to close it before clicking on the desired element. Page hasn't loaded With Dojo usage, sometimes the page takes lot of time to load - at times causing "stop script" alerts as well. To remedy this, set a page load timeout. driver.manage().timeouts().pageLoadTimeout(5, TimeUnit.MINUTES); Consume the alert. public void acceptAlertIfPresent() { try { // Check the presence of alert Alert alert = driver.switchTo().alert(); // if present consume the alert alert.accept(); } catch (NoAlertPresentException ex) { // Alert not present ex.printStackTrace(); } } Lot of Ajax processing In an app involving lot of Ajax processing e.g. a GWT app, it's im

Sikuli - QA automation framework

I recently came across a QA automation framework called Sikuli ( www. sikuli .org/ ) which is based on pattern recognition. This essentially gives one flexibility to create a single test case for an application with responsive web-design. So an application can be tested on a web-browser, desktop version of the app and on an emulator for mobile. Do have a look at it.

Face recognition using OpenCV

Image
I'm evaluating software for face recognition and motion sensing and came across OpenCV. It gives excellent APIs for pattern recognition out-of-the-box - see the green rectangles in the photograph.  

Space saving furniture

Some really interesting furniture designs. http://youtu.be/catll-XwVn0

SDO usage example

Here's a sample of using SDO framework in WCS BOD controller commands. For update use-cases, one will use ChangeBusinessObjectMediator instead of ReadBusinessObjectMediator. Hope you'll find it useful. SelectionCriteria aCriteria = new SelectionCriteria("{_wcf.ap=' IBM_Admin_ CatalogEntryAttributes'}/ CatalogEntry[ CatalogEntryIdentifier[( UniqueID='11545')]]", "com.ibm.commerce.catalog");             ReadBusinessObjectMediator bom = DataServiceFacade.getInstance( "com.ibm.commerce.catalog"). getReadNounMediator(aCriteria) ;                         Iterator iter1 = ((CatalogEntryType)bom. getNouns().get(0)). getCatalogEntryAttributes(). getIterator();             while (iter1.hasNext()) {                 CatalogEntryAttributesType attr = (CatalogEntryAttributesType) iter1.next();                 System.out.println("attribute: " + attr);             }

Rules engine for promotion

I am reading about rules engine and thought it would be a good idea to get some feedback from the forum. Rules engine allows one to write rules in Domain Specific Language (DSL). eg. one could write promotion rules as Customer has following attributes    - age is less than 42    - cart value is greater than 150    - type equals 'Guest' Then apply 10% discount This allows a BA to write business rules instead of a developer. During runtime, the engine parses all the rules and generates output which satisfies all the rules (thereby giving the flexibility to add new promotion rules incrementally covering wide range of scenarios). Since rules reside in a normal text file, it can be modified without redeploying an application. My question is - what is the flip side of using such a solution? UPDATE: IBM WCS might have suffered the peril of early adoption or they want to move to their proprietary solution (they acquired ILOG JRules in 2009). Considering the advances in

Smart home solution

http://www.youtube.com/watch? v=6VxZXvzONv8 Here is a short video of a smart home solution made in India which allows one to control an electrical device using a browser. The solution consists of a master controller and multiple slave devices communicating using wireless protocol. The master connects to a PC using USB. User devices like lights, fans, TV, AC etc. are connected to the slave device. This enables the end-user to configure complex rules in his PC (the real "brain" behind the "smart home" in this solution) according to one's taste. Hence, the "smartness" of your home will no longer be limited by the "smartness" of individual devices.

Openstack cloud platform (VM image for demo and testing)

I've set up a Virtual box ( https://www. virtualbox .org/) VM image for Openstack cloud platform ( www. openstack .org/) . It's approximately 3GB image. For acceptable performance, you should have atleast 1GB RAM.