We should have a little bit javascript knowledge.
Now, Let’s write our first test script. In this first test script, We will only see, How can we launch a Browser and How can we navigate to our applicate in the browser using Selenium with Javascript.
const {Builder, Browser} = require('selenium-webdriver');
(async function example() {
//launch the browser
let driver = await new Builder().forBrowser(Browser.FIREFOX).build();
//navigate to the application
await driver.get('https://www.google.com/ncr');
//close the browser
await driver.quit();
})();
const { Builder, Browser } = require("selenium-webdriver");
(async function example1() {
//launch the browser
let driver = await new Builder().forBrowser(Browser.FIREFOX).build();
//navigate to the application
await driver.get("https://qpdemoecommerce.com");
//close the browser
await driver.quit();
})();
We have covered below topics in today’s session
Objects, Classes and Constructor in Javascript Classes and Objects A class in any programming language…
We will start from object oriented programming basics like What are different concepts in Object…
Why we can not over ride a Constructor This is a very important question, that,…
What is Arrow Function In the last session, We had discussed about Anonymous Function. Anonymous…
What is Anonymous Function Anonymous Function is a type of function which has no name…
What is Map, Reduce and Filter Map Filter and Reduce are higher order methods for…