Skip to main content

Posts

Testing auto suggest using Selenium

Happened to work on Auto Suggest feature of late and was to automate it using Selenium. Auto Suggest feature is similar to suggestion list which is displayed when user types in search term in Google or Yahoo search boxes and a suggestion list is displayed for typed in term. Started my experiments with "type()" method of selenium but of no avail. browse through a couple of site and found others have had success using native key press methods. But did not work with me. Then came across combination of using both "type" and "typeKeys" and voila it worked. selenium.type(getPageElement("AutoSuggest", "SearchBox").trim(), ""); selenium.typeKeys(getPageElement("AutoSuggest", "SearchBox").trim(), searchTerm); Though still have some intermittent problems which cause a letter in search term to not be typed in search box in a random fashion, but can live with it for now :-) ~T

Selenium Page Objects

Have been reading about page objects in selenium of late and came across a couple of pointers which I wanted to share here - 1. If user action causes ctrl to appear on a different page then that corresponding page object should be returned else same page object should be returned. 2. Test code (Verification/Assertion) should be included in test and should not be part of page Objects them selves 3. Page object need not represent entire page, it may represent part of page which may appear on site multiple times or multiple times on same page. 4. Page Object offers the services represented by that page. Reference: http://www.slideshare.net/dantebriones/using-the-page-object-pattern http://www.theautomatedtester.co.uk/tutorials/selenium/page-object-pattern.htm http://code.google.com/p/selenium/wiki/PageObjects of late contributed an article on Page Object on Selenium Head Quarter. It could be found here .                    ...

The Nanny

Have been watching Nanny and yet again it is as engaging as it was when I first watched it about 9 years ago. I can never get enough of Fran's honest concerns with kids especially Maggie. How Fran salvages her from situation which Fran herself experiences in past. I see CC as one of most downplayed character of show. Though she is portrayed chesty woman looking down upon at Niles and Fran, but they are equally responsible for making her hate them; be it Niles constantly lampooning her or Fran getting in the way of CC and Maxwell. Fran's granny Yetta, is another favorite of mine. She is the oldest person in the show but carries more warmth than any one else. And then there is Gracie, who is always protected by Fran (and so as the others kids in family). I dare say, The Nanny has potential to be as famous as Friends; just needs a better publicity. p.s. got to know about nanny reunion should download soon.

XPath and single quotes

I had tough time dealing with XPath and single quote. Though W3C recommends using ' to escape it but I never got it working, let me know if any of you get through. Came across this blog and found that “concat” could be used in this situation. So original XPath expression is – //meta[@name=’DESCRIPTION’][@content=’Tester’s Test’] This is some thing which certainly fails as single quote in “Tester’s” marks it at end of string and then XPath blows up, next trial was – //meta[@name=’DESCRIPTION’][@content=’Tester''s Test’] This does not work despite w3c recommendation! And then I used concat function and split the string as – concat(‘Tester’,”’”,’s Test’) NOTICE that single quote is kept in double quote while other characters are kept in single quotes. So XPath looks as – //meta[@name=’DESCRIPTION’][@content=concat(‘Tester’,”’”,’s Test’)] And this works charm.

Bye Bye Ciber

Today was my last day at Ciber and I can not stop but blog about my experiences at Ciber/Iteamic. Looks like it was yesterday (13th Feb 2006) when I stepped in to Iteamic with three new joiners - Janakiram, Shamial and (well I don't remember third name). Happened to begin work with Emergent which turned out to be biggest testing team in Iteamic and found my first team lead Bindu who, well how much ever I admire would be less. A team lead who knows how to nurture new joiners. Made friends like Poornima, Shilpa (Chatter Box), Aarati (who was always ready to help with no strings attached) and Rekha (who made me understand req which other wise were Greek to me). By now I realized that I have strange habit of naming people on how I perceive them. After three months I found my self associated with Anian and got to meet Mallikarjuna (My second team lead). Mallikarjuna has been most hard working team lead I have worked with, hard working to the extent that it intimidates me! I would find...

Test Automation Recovery Scenarios: how much recovery

This article is not specific to QTP but elaborates a more general problem with functional test automation. I caught the fancy of recovery scenarios when came across such feature in QTP. QTP's motive is to recover from problems of unexpected pop up windows (though concept itself is contradictory and requires you to know object properties of unknown window in advance!) .Though soon realized that it is more of marketing gimmick than of being of much importance to automation it self. Some thing which always puzzled me was how much of such scenarios to use. While under going In house QTP training we were told to even check presence of objects before exercising them. This is to make sure that QTP does not throw any pop up error during test case execution. (at least this is what we were told during training). Later I realized that using QTP properties could be to order QTP do what is intended (though in a limited manner). This idea of checking every object before test freaked me out. I ...

"Loading......." the contents

Came across a testing blog yesterday and started browsing all past blogs of it using calendar. Look like my network is slow and I got to see "Loading...." message after clicking on calendar link. I collapsed the link and clicked on calendar again and got to see "Loading....... Loading.......". Each collapse and expansion of calendar increases the message "Loading......."  by count one. After a few clicks After a few more clicks