Skip to main content
blog title image

4 minute read - JavaScript Tips

JavaScript Resources

Apr 14, 2020

TLDR; A lot of good resources for learning JavaScript exist. And you do not need to install an IDE, you can learn JavaScript in the console.

How does learning JavaScript help?

  • When testing a web app you can look at the code
  • Understand the code
  • Understand errors written to the Dev Tools Console
  • Workaround application defects
  • Automate in the browser
    • I can nudge the client side into different states by executing ad-hoc JavaScript through the console
  • The DOM web developer displays make ever more sense
  • Create helper tools as BookMarklets
  • Improve your use of WebDriver’s JavascriptExecutor
  • In strange and mysterious ways that will surprise you once you learn JavaScript.

Learning JavaScript increases the Surface Area of the System that we can pull information from (i.e. model it), and potentially observe, interrogate and manipulate in more dimensions.

It increases our options, and therefore our ability to handle an increased variety of applications and technologies.

It also helps my automation;

  • My ability to use the JavaScript calls has improved so I don’t have as much trouble with web sites that don’t play nice
  • My CSS selector skills have improved

Clearly for most Selenium automation purposes, we don’t need a large grasp of JavaScript, we mainly do quick DOM access scripts, the kind of thing you would do through the console for debugging.


Any Resources? If you are a tester and want to learn JavaScript…

Tip 1… Automating in the Browser

My Test Automation U Course

https://testautomationu.applitools.com/automating-in-the-browser-using-javascript/

  • a free course
  • explains how to use the browser dev tools for automating

Tip 2… Eloquent JavaScript

Read (free) Eloquent JavaScript

Good for understanding the language. And Code Sandbox good for seeing code running.

Pull the language together to help you understand it as a programmer.


Tip 3… JavaScript Enlightenment

Read (free) JavaScript Enlightenment

An indepth look at ‘modern’ JavaScript features.


Tip 4… Speaking JavaScript

Read (free) Speaking JavaScript

A good overview of the syntax and language.


Tip 5… DOM Elightenment

Read (free) DOM Elightenment

Understand and manipulate the DOM in depth. We will do this a lot when automating from the browser.


Tip 6… JavaScript Design Patterns

Read (free) JavaScript Design Patterns

Much of the use of JavaScript will be tactical unless being used as the main language for coding automating or writing apps. This is important to learn when you start writing more code, especially if you have to maintain it. And can be useful for helping understand structure of other peoples code.


Tip 7… Support Page

The support page for my Test Automation U Course (has even more links):


Tip 8… Go Make Things

Subscribe to Chris Ferdinandi’s “Go Make Things” JavaScript newsletter.

Short, regular posts with easy to read and understand JavaScript code snippets.

Tip 9… Useful Snippets

Check out the Chrome Extension “Useful Snippets”

Viv Richards @11vlr and I wrote this web testing tool.

And the benefit is, each time you run a command you see the JS in the console.


Tip 10… JavaScript for Cats

Have a look at “JavaScript for Cats”. A tutorial web page, where all the examples and coding take place in the dev tools. And it has some additional resources for future reading.

A fast overview you can use in the browser.

Tip 11… Javascript Weekly

Subscribe to the JavaScriptWeekly.com email newsletter.

Or subscribe to their RSS feed, or read the backlog of newsletters.

This provides a good summary of posts around the web related to JavaScript.

Tip 12 - Java5cript.com

Java5cript.com is an updated list of videos, books and courses to work through. It did not exist when I first created this list, but since it does now, I thoroughly recommend reading through it.

It might be a little overwhelming at first, so I’ve put it lower on the list to try and restrict your options until you get the basics under your belt, then you will be able to explore Java5cript.com and find the next resource to help you on your journey.

Tip 13 - Impatient JS Books

Over on exploringjs.com Axel Rauschmayer has three free books covering JavaScript:


Tip 14… Order to use them

  1. Subscribe to “Go Make Things” and be drip fed information - gomakethings.com
  2. Subscripe to “JavaScriptWeekly.com” and receive a weekly prompt to continue to learn.
  3. Read JavaScript for Cats jsforcats.com
  4. Follow My Test Automation U Course Automating in the browser
  5. Read Speaking JavaScript speakingjs.com
  6. Eloquent JavaScript eloquentjavascript.net
  7. Read DOM Elightenment domenlightenment.com
  8. JavaScript Design Patterns addyosmani.com/resources/essentialjsdesignpatterns/book/
  9. Course Support Page - eviltester.com/page/onlinetraining/testautomationujs
  10. Useful Snippets - github.com/eviltester/usefuljssnippetextension
  11. Read JavaScript Enlightenment frontendmasters.com/books/javascript-enlightenment
  12. Read JavaScript for Impatient Programmers
  13. Visit Java5cript.com

Free Video Inside