Five Key Tips To Write Better WebDriver Scripts

Anyone can learn to write WebDriver scripts to help with automation and testing. Even team members with no coding experience can learn to help contribute value to their teams, and learn in fairly short order!

This session is targeted to help team members write WebDriver code that's accurate, understandable, and maintainable. Learning these tips will help you and your teams write stable WebDriver scripts that won't require constant tweaking and maintenance.

Attendees will see practical demonstrations of concepts including the Page Object Pattern, good Locator strategy, dealing with asynchronous actions, and writing custom APIs (also called "backing APIs") to help facilitate better testing.

Additionally, we'll discuss why it's so important to team testers up with software developers in order to get the best out of testable systems.

Examples will be in C#, but Ruby and Java will also be discussed—or any other platforms the attendees ask about.

 
 

Outline/Structure of the Workshop

  • Overview of compilers/interpreters as needed
  • Overview of components for WebDriver to run
  • Developer involvement
    • Good coding practices
  • Page Object Pattern
  • Locators
  • Asynch
  • Custom APIs

Learning Outcome

  • Understand why it's critical to build readable, maintainable WebDriver scripts
  • See practical examples of the five tips outlined repeatedly above
  • Understand why pairing testers and developers together is so beneficial for the final product

Target Audience

Team members who are just starting to write WebDriver, or have been writing a little.

Prerequisites for Attendees

A basic understanding of coding is helpful; however, I will poll the audience when starting and see if anyone needs a basic overview of how a compiler or interpreter works.

I will give a basic overview of how WebDriver fits with a testing framework, test runners, and natural language frameworks like Cucumber.

schedule Submitted 1 year ago

Public Feedback

comment Suggest improvements to the Speaker
  • Anand Bagmar
    By Anand Bagmar  ~  1 year ago
    reply Reply

    Hi Jim,

    Since attendees are not really coding in this workshop, any particular reason why this is a 90 min instead of 45 min? Wouldn't it be too long a discussion where you are demonstrating tips?

    Also, I think it would be good demand for examples to be shared in Java / Ruby as well.

    • Jim Holmes
      By Jim Holmes  ~  1 year ago
      reply Reply

      Anand,

      I'm happy to do whatever the organizers feel would be best for the attendees.

      Having done a number of coding workshops, I find 90 minutes a challenging duration to have a significant portion of the audience following along coding--it's easy to lose significant amounts of time just getting environments set up and prepared, even if one has a link to a zip of an entire project.

      Given that, I look at the 90 minutes as an opportunity to do a significant deep dive into practical examples, with enough time to have open discussion with the attendees. This allows them to drive the discussion to their needs.

      I could also do a 45 minute presentation of the same five tips; however, that would be only moderate depth for each concept. That would also limit the amount of discussion time with attendees.

      Again, I will happily adjust this to whatever the organizers think best.

      As I mention in the abstract, I will discuss Java and Ruby. If the session is 45 minutes there will not be enough time do do much other than give them a quick cover. Frankly, though, all five tips are language-agnostic. It's much more about understanding the concepts and the depth behind them.

      Thank you very much for your feedback. I hope my response helped, and didn't just come across as "I don't care what you think."


  • Liked Anton Angelov
    keyboard_arrow_down

    Anton Angelov - Infinite Improbability Testing- Execute All Tests in Parallel

    Anton Angelov
    Anton Angelov
    CTO
    Automate The Planet
    schedule 1 year ago
    Sold Out!
    45 Mins
    Talk
    Intermediate

    100000 tests executed under half an hour - sounds like a myth? Well, we made it, and I'm going to tell you a story how we got there. Through surveys, we discovered that many companies desire to utilize the benefits from parallel tests execution to optimize their software development process. However, they struggle with the process. Lack of available tooling, documentation, tests data arrangement/deletion, handling E2E tests specifics like browsers, emulators, etc. We were one of this companies. Because of that, we created an open-source tool for the job. Throughout the presentation, you will find statistics where, depending on the type of the tests, the tests execution can speed up from 4- 40 times which makes the run of the 100000 tests possible for 27 minutes.

    It will be shown how to utilize the tool, its various features and where/when it is appropriate to use it. Also, you will find example solutions to most of the common challenges in executing tests in parallel. We believe that in the near future the parallel tests execution will be a necessity, much like unit tests or continuous integration now. This will be one of the pillars for the companies to improve their competitiveness and effectiveness.

  • Liked Jim Holmes
    keyboard_arrow_down

    Jim Holmes - Experience Report: Changing Testing Culture in a Ginormous Company

    45 Mins
    Talk
    Beginner

    How do you change culture, mindset, and skills in a global organization entrenched in practices that were outdated 20 years ago?

    One small, frustrating step at a time.

    In this talk I'll share my experiences working at a Fortune 10 company where I helped small teams of testers on three different continents dramatically change how they helped their projects deliver value to the company. I'll talk about dealing with people (NOT RESOURCES!), helping teams improve their technical skills, getting non-technical testers comfortable with writing automation code, navigating ways through corporate bureaucracy and fifedoms, and most importantly how to get advocates at levels that can actually help you with change.

    This talk will be full of abject failures we suffered, but also highlight some of the amazing changes we saw over a three year period.

    Slides: https://speakerdeck.com/jimholmes/changing-testing-culture-in-a-ginormous-organization

  • Liked Gil Tayar
    keyboard_arrow_down

    Gil Tayar - Not Only Cars: “AI, Please Test My App”

    Gil Tayar
    Gil Tayar
    Sr. Architect
    Applitools
    schedule 1 year ago
    Sold Out!
    45 Mins
    Talk
    Beginner

    Autonomous cars were a Scifi dream not 10 years ago. A computer driving a car? No way. But it did happen, and is happening. And if scientists do it for a complicated task such as driving, can they do it for automated regression testing? In this talk we explore what is being done in the field today, but also speculate about the future: we introduce the 6 levels of autonomous testing (that correspond to the 5 levels of autonomous driving), and try and figure out what kind of help current AI techniques can bring to automated testing.

  • Liked Nalilnikanth Meesala
    keyboard_arrow_down

    Nalilnikanth Meesala / Srinivasan Sekar - New hope in Selenium Docker

    45 Mins
    Demonstration
    Advanced

    Idea behind this talk is to describe how to create a short lived containers for each test and scale to large Selenium Cluster using Selenoid. What is standard Selenium architecture and why it is not suitable for big clusters, Also states issues in maintaining a large Docker Selenium Grid / Selenium Clusters. In this session we will also be talking about the challenges we faced in using official selenium docker images and how we scaled up regression execution time from 3:3 (3 hours to 3 mins). Followed by a demo of how Selenoid server solves the problem with docker. How it works, how to use inside big Selenium cluster, where else it could be used.

  • Haritha Hari
    Haritha Hari
    Sr. Quality Analyst
    ThoughtWorks
    schedule 1 year ago
    Sold Out!
    45 Mins
    Demonstration
    Intermediate

    Docker can be used to containerize Selenium tests and can be made to run against applications in another container. These tests can be further run on Selenium grid without the need of physical machines or VMs using Docker Selenium. Multiple and different versions of browsers, headless mode etc can be run inside containers and can be used to run tests in parallel. All these can be achieved with minimal changes to the existing Selenium tests.

  • Liked Manjyot Singh
    keyboard_arrow_down

    Manjyot Singh - QAOPS - QA Testing in a DevOps World

    Manjyot Singh
    Manjyot Singh
    Lead QA Consultant
    Thought works
    schedule 1 year ago
    Sold Out!
    45 Mins
    Demonstration
    Intermediate

    QAOps is Continuous Testing Strategies when
    frequent software delivery matters.

    It is no surprise that automation and orchestration
    make life very easy, be it a small organization or
    a large-scale industry that houses hundreds of
    servers. IT automation is essentially the ability to
    orchestrate and integrate tools,
    people, and processes through a certain workflow. I will be using Ansible and Docker to showcase the same and writing ansible tests on top of that.

    Ansible - Ansible is an IT automation tool which can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments. Ansible is actually designed to be a “fail-fast” and ordered system, therefore it makes it easy to embed testing directly in Ansible playbooks.

    Docker - A docker container is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, runtime, system tools, system libraries, settings. Containers isolate software from its surroundings, for example differences between development and staging environments and help reduce conflicts between teams running different software on the same infrastructure.