August 29, 2014

Enthused About: Widget Libraries for Browser Automation

At work, we use Selenium WebDriver (specifically, the Java API) for browser automation. Last December, we released our internal library which builds on WebDriver. We call it Extensions for WebDriver, or ExtWebDriver.

Since its first release, we've done a number of additional releases with relatively small enhancements. We've also presented the library to a number of test automation interest groups, the largest of which was the Metro NYC Selenium Users Group. That talk is immortalized on YouTube.

Today I thought I would write about what I consider to be the coolest feature of ExtWebDriver - its widget library approach.

The Selenium community generally promotes the use of an abstraction called the Page Objects, whereby the code for interacting with a single page of a web application is split into objects. In the ExtWebDriver library, we ship with out-of-the-box components defined at least one level deeper than Page Objects, which we call Widget Objects. An ExtWebDriver Widget Object (or Widget Class) knows how to interact with a single Widget. Automation engineers can leverage existing, well-tested, and often reusable widget objects when writing Page Objects or their equivalent.

The current version of the library (v. 1.4 as of this post) ships with a hierarchy of Widget Interfaces and concrete implementations for a basic Element and InteractiveElement. We also have a set of widget objects for standard HTML elements like Button, Input, List, Radio Group, and Table. In each object, you'll find the methods you'd probably expect. For example, Table ships with getRowNumber, getTableColumnCount, getTableDataInArray, getTableDataInMap, getTableHeaders, getTableRowColumnData (for a specific cell in the table), getTableRowCount, and isItemExist. Perhaps the most useful objects are the base objects below HTML like Element and InteractiveElement.

For those familiar with WebDriver, you may ask why we don't simply use the base WebElement class and extend it directly. For one thing, there's no promise that ExtWebDriver won't do this in the future (our latest release included use of the By locator objects from Selenium's framework). For now, the abstraction layer between ExtWebDriver's widgets and WebElement does isolate users of the library from the particulars of WebElement that may otherwise not be pertinent to a particular widget. The Element base class does provide a getWebElement method for direct access to the WebElement underlying any widget object instance.

As a designer, developer, and maintainer of browser automation solutions, I find the reusability of widget libraries attractive. The testability of UI front ends continues to be a driver for framework development as a whole (consider the "Testable" bullet on the AngularJS Homepage), and if we could aim to develop widget libraries for popular frameworks like GWT, jQuery UI, and Bootstrap, I think we could all (as the automation community at-large) more effectively minimize the tedious rework that many of us now carry out in isolation. I can envision frameworks in the future which deliver automation capabilities alongside every feature or UI widget of a framework. Automation-ability has become nearly synonymous with the ability to test effectively for fast-moving teams.

By the way, ExtWebDriver has plenty of other features, too! Another contribution of ExtWebDriver is its SessionManager, which includes a property-file based instantiation of thread-safe WebDriver sessions. You can get started with a quick example right here.

60 comments:

  1. If you are willing to develop a website but you dont know web development or coding then relax wordpress CMS platform is just for you. Where you can create website all by yourself.
    wordpress training in chennai | Wordpress course in chennai

    ReplyDelete
    Replies
    1. I have read your blog its very attractive and impressive. I like it your blog.

      Java Training in Chennai Core Java Training in Chennai Core Java Training in Chennai

      Java Online Training Java Training in Chennai Core Java 8 Training in Chennai Core Java 8 Training in Chennai JavaEE Training in Chennai Java EE Training in Chennai

      Delete
  2. Virginia SEO Company I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.

    ReplyDelete
    Replies
    1. I have read your blog its very attractive and impressive. I like it your blog.


      SEO Services in India SEO Company in India SEO Company in India

      Guaranteed SEO services Guaranteed SEO

      Delete
  3. Digital Marketing is one of the most promising field which is giving a tough tie for traditional marketing methods.
    digital marketing course in chennai | Digital Marketing training in chennai | digital marketing courses in chennai

    ReplyDelete
  4. look here and get cool website development service with amazing lots of apps what a great post web design and development services

    ReplyDelete
  5. Selenium is the best tool for software testing automation and it is used globally by the top companies across globe. Get training to use selenium and star yur career as a siftware tester today.
    Selenium training in Chennai | Selenium course in Chennai | Selenium training institute in Chennai

    ReplyDelete
  6. Excelent For browsing automtion.
    SEO training in hyderabad by experts in digital markeing And by prosessional experts in seo.All the training by placement and also guide by the professionals.SEO training in hyderabad

    ReplyDelete
  7. Informative post. I learned lot of new informations. Thanks for sharing.

    Internet Marketing Company in chennai

    ReplyDelete
  8. this is valuable information for learners.thanks
    http://hadooptraininginhyderabad.co.in/salesforce-training-in-hyderabad/

    ReplyDelete
  9. Good post. Happy to visit your blog. Thanks for sharing.


    Seo courses in Chennai

    ReplyDelete

  10. Good article. I am experiencing a few of these issues as well..
    salesforce training in hyderabad

    ReplyDelete
  11. Useful Information
    one and only affiliate agency in south INDIA, earn money online from affiliate network in india

    ReplyDelete
  12. Freshers jobs way provide freshers jobs ,walkins,direct recruitment,openings for freshers and experienced and recruiting experienced and freshers Walkins

    ReplyDelete

  13. useful information

    Online recruitment for bank jobs and government jobs and you can get Notification and application to apply online for bank jobs and govt jobs

    ReplyDelete
  14. Useful information:
    General Awareness and Current Affairs with Latest Current Affairs Quiz, GK Updates, General Knowledge Last 6 Months Current Affairs, Placement Papers, Model Papers, Interview Questions @ examvalue.com

    ReplyDelete
  15. useful information

    Online recruitment for bank jobs and government jobs and you can get Notification and application to apply online for bank jobs and govt jobs

    ReplyDelete
  16. Useful Information……
    Recruitment voice contains Daily GK Updates, Bank Recruitment, Government jobs, Bank jobs, Interview Tips, Banking News, GK Updates Bank Recruitment

    ReplyDelete
  17. Nice Information:
    Telugu Cinema Contains Telugu Cinema News, Latest Movie Reviews, Actor, Actress, Movie Galleries And Many More Telugu Cinema News

    ReplyDelete
  18. Rolex Watches Authentic Mens & Ladies Rolex Datejust, President Watches for Sale at JavyEstrella.com.

    ReplyDelete
  19. Nice Blog

    Telugu70mm.com Provides Latest Telugu Movie Reviews and other news like Telugu Movie News , Telugu Political News and Movie Released Dates

    ReplyDelete
  20. Helpful Information

    Telugu70mm.com Provides Latest Telugu Movie Reviews , Telugu Political News and Other Latest Telugu Movie News

    ReplyDelete
  21. We prefer to honor several other net sites around the internet, even when they arent linked to us, by linking to them. Below are some webpages worth checking out.
    Here My web
    - Grosir Jaket Parka
    - Grosir Jaket Parka
    - Grosir Jaket Parka
    - Grosir Jaket Parka
    - Grosir Jaket Parka
    - Grosir Jaket Parka

    ReplyDelete
  22. •can any one suggest me about testing training institute with 100 % placement in adyar....
    informatica Training in Chennai



    ReplyDelete
  23. EXCELLENT POST, fastest local search engine in India Fastest Local search Engine in Indiafor more details 7871360360

    ReplyDelete
  24. Helpful Information:

    Telugu Cinema Contains Telugu Cinema News, Telugu Movie Reviews and many more @ http://www.telugucinema.com/

    ReplyDelete
  25. A debt of gratitude is in order for requiring some serious energy share this post. It is truly useful. I propose to visit this site to my group members. Please continue posting this way.
    Regards,
    Selenium Training in Chennai | Selenium Testing Training in Chennai | Selenium Course in Chennai

    ReplyDelete
  26. The future of automation testing tool is on the positive tool. As the demand of quality web application keeps on increasing, the tool like Selenium IDE is getting very popular all over the world. Thus, taking Selenium Training in Chennai will help you to enter software testing industry.Best Selenium training institute in Chennai

    ReplyDelete
  27. Thanks for the information about Web Driver. The widgets libraries for selenium automation are interesting to know. Keep going
    AngularJS Training Institute in Chennai | Best AngularJS Training in Chennai | AngularJS training and placement

    ReplyDelete
  28. Its really helpfull.., thanks for sharing this.

    Papa jobs Providing latest information about Current affairs, Bank Recruitment, Government jobs, Bank jobs, IT jobs., check this link papa jobs i hope this is very use full to you and all the very best Guys.

    ReplyDelete
  29. This comment has been removed by the author.

    ReplyDelete
  30. Great information buddy. Your post is very clear and neat. Really it will be helpful for the working professionals.
    .Selenium course training in Chennai | Best Selenium testing training institute in Chennai

    ReplyDelete
  31. Excellent post!!!. The strategy you have posted in this technology helped me to get into the next level and had lot of information in it.AngularJS Training in ChennaiBest Angularjs Training in Chennai

    ReplyDelete
  32. This is very informative blog and nice article , I really like your technique of writing a blog. I book marked it to my bookmark site list and will be checking back in the near future
    Thanks and Regards,
    Selenium Training in Chennai

    ReplyDelete
  33. Thanks for sharing the best posts they very nice and very help us you made a good site it's very impressive one. I got such a good information on this topic it's very interesting one I am very satisfied with your site and your posts they very useful to us and amazing.

    http://telugubullet.com/english/

    ReplyDelete
  34. Very Nice Blog I like the way you explained these things. I’ve been looking for ways to improve my website and overall rankings.I hope your future article will help me further.Take SEO Training in Chennai to mould yourself.

    ReplyDelete
  35. Thanks for the post, It is very helpful. High appreciate the efforts for sharing all the in-details.

    Selenium Training Institute in chennai

    ReplyDelete
  36. really nice blog. it will be really helpful to the peoples who are all working under the technology. so thank you for sharing this blog. keep on sharing this kind of useful blog.
    selenium training in chennai

    ReplyDelete
  37. Nice Information
    one and only A Digital Marketing Agency in INDIA affiliate network in india

    ReplyDelete
  38. really you have posted an informative blog. it will be really helpful to many peoples who are all working under the technology.
    android training in chennai

    ReplyDelete
  39. I have seen your post .I listed some jobs on Devops so please visit my link ....https://www.perfectprofile.net/search-jobs/devops-openings-in-hyderabad/

    ReplyDelete
  40. I am an avid reader who likes engaging content. That's why I am here. Your original views on this topic are refreshing and interesting. selenium Jobs in hyderabad

    ReplyDelete
  41. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Android Training in Chennai
    Ios Training in Chennai

    ReplyDelete
  42. Nice information. Your post is very clear and neat. Really it will be helpful for the working professionals.Thanks for sharing..,


    selenium Training in Bangalore

    ReplyDelete
  43. Once you enter the complete information in CRM for small business, your employees will be able to go through the information related to past sales and take decision based on the comparison. Best Small Business Customer Relationship Management solutions

    ReplyDelete
  44. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Android Training in Chennai
    Ios Training in Chennai

    ReplyDelete
  45. The Himachal Pradesh Board of School Education (HPBOSE) has announced the notification for HP TET Notification 2017 Himachal Pradesh Teacher Eligibility Test (HP TET) notification HP TET 2017

    ReplyDelete
  46. Informative post! I really like and appreciate your work, thank you for sharing such a useful facts and information about topWidget Libraries strategies, hear i prefer some more information about digital marketing training institute in hyderabad

    ReplyDelete