Selenium has been a pinnacle for open-source software in the industry of automated website testing. The automation testing framework is widely adopted by the testing community to help them in automating interactions with their web-application for desktops.

I have been an automation tester from couple years now, and have been fondly towards Selenium ever since I knew what it’s capable of. Recently, I was pondering about a few questions though! What would happen if I disable JavaScript and then perform automation testing with Selenium? How would a website react then? Is it even possible? Is it even required?

The only way to know the answers to these questions was to have them tested myself. And I came up with interesting results. Which is why I am writing this article to share these results with you.

Things That Can Be Done With JavaScript & Things That Can’t Be!

I am sure you must be intrigued to know if there is a need for testing a web application after disabling the JavaScript? However, before I answer that question we need to understand what you can do as a tester with JavaScript & what you cannot!

Things You Can Do With JavaScript

  • Access and modify all the content visible on the web page such as text, images, videos or any other kind of private data.
  • Access the cookies sent by the web server.
  • Make request to other servers for data capturing.

Things You Can’t Do With JavaScript

  • Accessing files stored in your local system other than those uploaded on a web page.
  • Accessing data from other web pages open in other tabs or on different browsers.
  • Accessing and controlling the hardware capabilities of your system.
  • Accessing any kind of stuff related to extensions and plugins which have been installed.

Now that you know the purpose of JavaScript. You may be wondering about the reason for your end user to disable JavaScript in their browsers while surfing the internet?

Why Would A User Visit Your Website With JavaScript Disabled?

Believe it or not! Some of us actually prefer to surf the internet with JavaScript disabled in our browsers. Why?

Well, by disabling JavaScript we aim to achieve an interrupted user-experience of a website’s content. Doing so eliminates of the pop-ups, advertisements, warnings etc.Let us take a scenario to understand this better.

Mike, a web developer, is a curious reader who wishes to keep him up-to-date on the latest technologies by reading blogs, webinars, video tutorials. Mike visited your website from search engine and is curious to read your blog around cross browser testing. However, the moment he lands on your website, he encounters a huge pop-up asking him to enroll to your newspaper. He closes the pop-up, clicks on your cross browser testing article, and scrolled further below. Now, he unintentionally clicked on a sponsored content. As a result, a new tab opened which routed him somewhere he never wanted to be.

What do you think Mike would be feeling right now?

Well, he may feel disappointed with the overall experience of the website. And such pop-ups are quite common to encounter on any website over the internet. Which is why, Mike made sure to disable the JavaScript to ensure he doesn’t encounter more pop-ups, alerts, warnings, advertisements etc. from your website.

However, the moment Mike disables JavaScript, your website collapsed entirely! The content rendered in an absurd manner. Your website images with embedded hyperlinks to related articles broke down & started showing the links separately than image.

#selenium #test-automation #javascript #manual-testing #latest-tech-stories #hackernoon-top-story #javascript-top-story #qa-checklist

Is Selenium Automation Testing with Disabled JavaScript Settings Worth Your Time?
1.15 GEEK