Selenium with Javascript – Introduction

Introduction

In this session, We are going to start our tutorial for Selenium with Javascript. So, In this session, We are going to discuss, what is Selenium, what is javascript, and which IDE, are we going to use in our project. So this is going to be a kind of Introduction to Selenium with Javascript. So, the topics we will discuss will be.

  1. What is Selenium
  2. What is Javascript
  3. Selecting IDE

What is Javascript

JavaScript is a versatile programming language commonly used for creating interactive and dynamic content on websites. Javascript was developed by Netscape in 1995.

It allows developers to

  1. add functionality – What happens when you Click on the button, What happens when you select a value from a dropdown
  2. validate forms
  3. manipulate the DOM (Document Object Model) – DOM is the internal html structure of the website
  4. create animations
  5. communicate with servers
  6. Test Automation

Features of JavaScript:

  1. Client-Side Scripting: JavaScript is primarily a client-side scripting language, meaning it runs on the user’s web browser rather than on the server.
  2. Dynamic and Weakly Typed: JavaScript is a dynamically typed language, which means we don’t need to declare the data type of a variable explicitly. It’s also weakly typed, allowing variables to change their type during runtime.
  3. Asynchronous Programming: JavaScript supports asynchronous programming using features like async/await syntax. This syntax helps when we are trying to access a webpage or any element on the webpage which takes time in loading.
  4. DOM Manipulation: JavaScript interacts with the Document Object Model (DOM), representing the structure of an HTML document. This allows developers to manipulate HTML elements, update content, and respond to user interactions dynamically.
  5. Cross-Browser Compatibility: JavaScript is supported by all major web browsers, making it a cross-browser scripting language.
  6. Server-Side Development: While JavaScript is primarily associated with client-side development, it has gained prominence on the server side as well. Node.js, a server-side JavaScript runtime, allows developers to use JavaScript for server-side scripting, enabling full-stack JavaScript development.
  7. Object Oriented Programming Language: Javascript is an Object Oriented Programming Language but it uses prototypes for inheritence rather than classes.
  8. Case sensitive language: Javascript is a case sensitive language.

What is Selenium Webdriver

Most of the Applications developed these days are Web Applications. So, when these Web Applications are developed, then we need to test them as well, and testing is done either manually or using an automation tool, So, we need an automation testing tool, which focuses primarily on Web Applications Automation Testing. Selenium is one such tool, Infact the most popular automation testing tool that focuses on Web Applications. Selenium is populary called Selenium Webdriver.

Features of Selenium Webdriver

  1. Selenium Webdriver is an open source browser automation library.
  2. Supports cross browser Web Testing.
  3. Supports several programming languages such as Java, Javascript, Python etc.
  4. One of the most popular automation tool for browser automation.
  5. Selenium supports automation testing only for Web Application.
  6. Javascript is one of the most popular programming language, that can be used for writing Automation Test Script, that’s why we are going to use Selenium with Javascript in this series.
  7. Most of the Web Application are built using Javascript, which makes Javascript as a preferable programming language for writing Automation Test Script.

Selecting IDE

We are going to select Visual Studio Code as an IDE for this series. An integrated development environment (IDE) is a software application that helps programmers develop software code efficiently. An IDE is a combination of code editor, compiler, interpreter, and a debugger, So,

  1. We can write a code in an IDE because an IDE acts like a code editor.
  2. We can compile our code in an IDE because an IDE acts like a compiler and interpreter.
  3. We can debug or run our code in an IDE because an IDE acts like a debugger.

So, that’s why we say, that IDE helps in writing code efficiently.

We are selecting Visual Studio Code as an IDE here because it happens to be the most flexible IDE as it supports, multiple programming languages like, C++ – C# – CSS – Dart – Dockerfile – F# – Go – HTML – Java – JavaScript – JSON – Julia – Less – Markdown – PHP – PowerShell – Python – R – Ruby – Rust – SCSS – T-SQL – TypeScript.

Summary

We have covered below topics in this session

  1. What is Javascript
  2. Features of JavaScript:
  3. What is Selenium Webdriver
  4. Features of Selenium Webdriver
  5. Selecting IDE
Admin

Working Professional with more than 12 Years of Experience in Software Testing with Automation and Manual Testing Knowledge.

Recent Posts

Objects, Classes and Constructor in Javascript

Objects, Classes and Constructor in Javascript Classes and Objects A class in any programming language…

55 years ago

OOPs in Javascript

We will start from object oriented programming basics like What are different concepts in Object…

55 years ago

Why we can not over ride Constructor

Why we can not over ride a Constructor This is a very important question, that,…

55 years ago

Javascript Tutorial – Arrow Function in Javascript

What is Arrow Function In the last session, We had discussed about Anonymous Function. Anonymous…

55 years ago

Javascript Tutorial – Anonymous Function in Javascript

What is Anonymous Function Anonymous Function is a type of function which has no name…

55 years ago

Javascript Tutorial – Map, Filter and Reduce

What is Map, Reduce and Filter Map Filter and Reduce are higher order methods for…

55 years ago