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.

94 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
  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
  3. look here and get cool website development service with amazing lots of apps what a great post web design and development services

    ReplyDelete
  4. 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
  5. 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
  6. Informative post. I learned lot of new informations. Thanks for sharing.

    Internet Marketing Company in chennai

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

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


    Seo courses in Chennai

    ReplyDelete

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

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

    ReplyDelete
  11. 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
  12. •can any one suggest me about testing training institute with 100 % placement in adyar....
    informatica Training in Chennai



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

    ReplyDelete
  14. 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
  15. 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
  16. This comment has been removed by the author.

    ReplyDelete
  17. 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
  18. 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
  19. 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
  20. 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
  21. Thanks for the post, It is very helpful. High appreciate the efforts for sharing all the in-details.

    Selenium Training Institute in chennai

    ReplyDelete
  22. 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
  23. 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
  24. 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
  25. 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
  26. 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
  27. 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
  28. Intresting post, Useful Info! Thanks for sharing.
    Techiemills provides Quality Salesforce Training in Hyderabad offers both classroom & online training with realtime projects + placement assistance . ( for students & professionals)
    salesforce training in Hyderabad
    salesforce training in Kphb

    ReplyDelete
  29. I have read your blog and I gathered some needful information from your blog. Keep update your blog. Awaiting for your next update.

    Quicktest Professional Training

    ReplyDelete
  30. Really Thanks For Posting Such an Useful and informative article. Mulesoft Certification Training

    ReplyDelete
  31. I and my friends were going through the nice, helpful tips from the blog then the sudden came up with an awful suspicion I never expressed respect to the website owner for those secrets.
    best safety training in chennai

    ReplyDelete
  32. You have provided a nice article, Thank you very much for this one. And I hope this will be useful for many people. And I am waiting for your next post keep on updating these kinds of knowledgeable things.
    French Classes in Chennai
    Big Data Training in Chennai
    Android Training in Chennai
    Selenium Training in Chennai
    JAVA Training in Chennai
    German Classes in chennai
    PHP Training in Chennai
    Best PHP training in chennai

    ReplyDelete
  33. Great post. I really happy to read this blog, because it is very interesting and useful. Thank you for your sharing. Keep more like this.Ecommerce Web Development Company In Chennai | Digital Marketing Agency In Chennai

    ReplyDelete
  34. Thanks for sharing the knowledgeable stuff to enlighten us no words for this amazing blog.. learnt so many things I recommend everyone to learn something from this blogger and blog.. I am sharing it with others also
    IT Software Training in Chennai | Python Training in Chennai | Dot Net Training in Chennai

    ReplyDelete
  35. Great content thanks for sharing this informative blog which provided me technical information keep posting.
    Java training in chennai

    ReplyDelete
  36. Thank you so much for posting this hub, Nice work on the Dot net Training..
    Regards,

    https://www.softlogicsys.in/datascience-training-in-chennai/
    https://www.softlogicsys.in/machine-learning-training-in-chennai/
    https://www.softlogicsys.in/linux-training-in-chennai/
    https://www.softlogicsys.in/dba-administration-training-in-chennai/

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

    ReplyDelete
  38. Useful Information :

    Looking for the Best [url= Digital Marketing Institute in Vijayawada ][/url] , We provide training on live projects, internship, Flexible Classes, Free Demo @ praiseads

    ReplyDelete
  39. This information really amazing thanks for share this article thank you..

    paheliyan

    ReplyDelete
  40. Awesome article. It is so detailed and well formatted that i enjoyed reading it as well as get some new information too.
    reactjs online training

    ReplyDelete
  41. Thank you for sharing such a nice post!

    Start your journey with SAP S4 HANA Simple Logistics Training and get hands-on Experience with 100% Placement assistance from experts Trainers @Softgen Infotech Located in BTM Layout Bangalore.

    ReplyDelete
  42. I will really appreciate the writer's choice for choosing this excellent article appropriate to my matter.

    data science course in guntur

    ReplyDelete


  43. 360DigiTMG, Indore is a leading solutions provider of Training and Consulting to assist students, professionals by delivering top-notch, world-class classroom and online training. It offers data science training in indore.

    ReplyDelete

  44. Thanks for sharing information awesome blog post Online Education Quiz website For Exam Follow this website Gk in Hindi

    ReplyDelete
  45. https://zulqarnainbharwana.com/celts/

    ReplyDelete
  46. Excellent post! This post was delivered a lot of information. Thanks for the effort to share this with us. Keep updating.

    python Training in chennai

    python Course in chennai


    ReplyDelete
  47. Hello there to everyone, here everybody is sharing such information, so it's fussy to see this webpage, and I used to visit this blog day by day
    data science course noida

    ReplyDelete
  48. Hi, im venky here to tell that topic explained in blog is clear and helpful too
    Digital marketing in Telugu

    ReplyDelete
  49. Amazing opportunities came with amazing time and here is our institution offering you CS executive classes and a free of cost CSEET classes. So what are you waiting for contact us or visit our website
    cs executive
    freecseetvideolectures/

    ReplyDelete
  50. hi thanku so much this information thanku so much
    home1
    visit here

    ReplyDelete
  51. The Universal Currency Converter Is The Most Reliable And Accurate CHF USD Currency Conversion Tool On The Internet. It Is Fast And Easy To Use, And Supports Over 150 World Currencies.

    ReplyDelete
  52. Do You Now AximTrade Login Is A Secure, Multi-channel, Multi-factor Authentication System, Enabling Customers To Securely Access Their Accounts To Fund/deposit, Request Withdrawal, Update Or Manage Their Profile And More.

    ReplyDelete
  53. Aximtrade Review Is The Foreign Exchange Trading Platform Of Choice For Over 100,000 Investors Around The World. It's The Place To Trade Forex And Cfds On Global Markets, With Access To A Huge Range Of Assets And Features All In One Place.

    ReplyDelete
  54. GQFX Review Offers A Safe And Secure Platform To Do Forex Trading And CFDs And Our Customer Support Is Ready To Help You 24/7. You Can Easily Sign Up Your GQFX Login Account Here.

    ReplyDelete
  55. Do You Know Unexpected Things Happen When You Use Aximtrade Reviews Metatrader Platform For Trade? Know The Details

    ReplyDelete
  56. There Are Many Complaints About XM REVIEW Broker In The Internet But You Should Read This Review Before Investing Your Money With Them. We Have Personally Tested XM Fx And Found It To Be A Scam, Avoid Them At All Costs!

    ReplyDelete
  57. Are You Thinking About Joining AVATRADE REVIEW ? If You Are Then Read The Review On AVATRADE Fx In This Article. We, Will, Tell You About The Company, The Brokers, The Platform, And All The Information You Need To Know. Read More Here.

    ReplyDelete
  58. I believe there are many more pleasurable opportunities ahead for
    individuals that looked at your site.
    best hadoop training in chennai
    software testing courses in chennai

    ReplyDelete
  59. This post is very simple to read and appreciate without leaving any details out. Great work!
    cyber security training malaysia

    ReplyDelete
  60. Know the Latest Smartphone Price with MobileErBazaar.com totaly free

    Some Peopole are want to know Vivo V23e price of bangladesh it's easy to know

    visit for know about Huusk Knives full Review

    ReplyDelete
  61. Very Informative and useful... Keep it up the great work. I really appreciate your post.
    It shows like you spend more effort and time to write this post

    https://bangaloredigitalmarketing.com/
    https://bangaloredigitalmarketing.com/digital-marketing-courses-in-bangalore/
    https://bangaloredigitalmarketing.com/seo-company-in-bangalore/
    https://bangaloredigitalmarketing.com/social-media-marketing-agency-in-bangalore/
    https://bangaloredigitalmarketing.com/digital-marketing-agency-in-bangalore/

    ReplyDelete
  62. This piece of article is amazing. I would also like the world to know about a company which gives best quality logistics service ,ie is AFM Logistics Pvt Ltd is an international freight forwarding and customs clearing company established in Delhi. The company was constituted in 2012 and is indulged in providing complete logistics solution. The company has its own setup and wide network of agents throughout the world. International Logistics Companies In India . They are the best air cargo and ocean freight forwarding company in Delhi, India. AFM Logistics Pvt Ltd has been working as Import and Export Agent in India since 2012. They have been providing personal baggage shipping services in India for a very long time.

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

    ReplyDelete
  64. Your Blog is very informative Plz Approve
    Guppy Gold Logistics
    Guppy Gold offers a number of air freight services with day-specific or day-definite scheduling, and door-to-door service. We have a wide variety of air freight services such as express, on-board courier, daily flights, and consolidated services.
    Low-Cost Air Freight Forwarding Services.

    Our Services

    1. Best USA Freight Forwarders in Delhi NCR and India
    2. Shipping to India from USA
    3. Railway Logistics
    4. Third Party Import Export
    5. Trucking & Delivery
    6. Best Custom Clearance Agents in Delhi


    Email: info@guppygold.com
    Phone: +91 859-585-1414
    www.guppygold.com

    ReplyDelete
  65. I am very happy to read this article. Thanks for giving us Amazing info. Unlock your full potential with our expert-led English tuition classes at Ziyyara Edutech. Our online English tuition offers personalized learning, interactive sessions, and comprehensive support.
    For more info visit English tuition online

    ReplyDelete
  66. I think this is the best information for me that I need in the past some time. Ziyyara Edutech's specialized Online GCSE Tuition – where academic challenges become opportunities for growth.
    For more info visit GCSE online tuition

    ReplyDelete