JavaScript Test Automation Complete Tutorial | Selenium JavaScript Tutorial | LambdaTest

JavaScript Test Automation Complete Tutorial | Selenium JavaScript Tutorial | LambdaTest

LambdaTest

2 года назад

120,512 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Relaxing
Relaxing - 21.10.2023 10:08

I learned a whole lot. I like how you teach (step by step), very clear. Keep publishing great classes. Thank you!

Ответить
630HU
630HU - 06.10.2023 15:55

Can't find Javascript option on the Lambdatest Capabilities Generator. With Node.js it does not working. What should I do? Thnaks

Ответить
Diego Mitma Ariza
Diego Mitma Ariza - 01.10.2023 19:18

Coul I install npm webdriver-manager instead donwload the web drivers? its the same, isn't? Thanks

Ответить
Ganesh khirwadkar
Ganesh khirwadkar - 13.09.2023 16:12

Amazing ! But I guess quality of videos could be enhanced as it deals with coding and people have to seeeeeee.

Ответить
Have Fun
Have Fun - 29.08.2023 06:22

when we login try with one driver browser, and login with multi user level can selenium do it?

Ответить
Aquarius Academy
Aquarius Academy - 26.08.2023 17:55

isn't Mocha like something different from Selenium? Why aren't you using grids

Ответить
Keno Jay Aguiar
Keno Jay Aguiar - 11.08.2023 22:59

great video, has anyone ever told you that you look like Tobey Macguire?

Ответить
Vico Hadiansyah
Vico Hadiansyah - 08.08.2023 06:03

Hi igot error like this
succses fully add on todo list:
WebDriverError: Unauthorized, either Username or AccessKey is invalid.

Ответить
celia T
celia T - 03.08.2023 20:34

hello, thx for the tutorial, but I have an issu with firefox. When I type "node tests/firstTest.js" in the terminal, firefox only open for 1sec, I can't see what's going on, no error message, just the search bar being red (? I don't know why). I'm on Windows, and I have no error in the VS terminal either, just the indication of my driver and browser Path. I really don't know what to do...

Ответить
Junk Junky
Junk Junky - 07.07.2023 11:58

very nice tutorial, but my ears are done, sometimes the sound is so loud I had to take my headphones down, sometimes I cant hear a thing

Ответить
beautyna1
beautyna1 - 08.06.2023 17:04

@ryantestsstuff hi! I am stuck on the first part and not sure why
When I add the tests and the first test file and run the code after writing the first assertion i got an error Applicable driver not found; attempting to install with Selenium Manager (Beta).... I followed all instructions but could have missed something.


Also when I added Mocha, and removed the 'tests/*js' from npx mocha --no-timeouts 'tests/*js' command, it didnt find the test file! why? when i add the follwoing command it works npx mocha --no-timeouts 'tests/*js' .

Ответить
tanvir hossain
tanvir hossain - 26.05.2023 13:04

Hello Ryan,
I really liked your tutorials, These lessons helped me a lot to understand and adopt the new platform, however, if you could create another updated version of these tutorials for Windows OS, it would be lot helpful. Thank you

Ответить
swapna patil
swapna patil - 05.05.2023 20:19

Hey Ryan
I am getting below error while running firsttest.js
throw new Error(
^
Error: Do not know how to build driver: Firefox; did you forget to call usingServer(url)?

Ответить
Luiz Assis
Luiz Assis - 22.04.2023 14:20

Hey Ryan,
I'm from Brazil, this course is amazing. Step by step everything explained and instructive, congratulations bro!
Please keep creating content like this.

Ответить
Adijat Akande
Adijat Akande - 30.03.2023 20:07

How do we set gecko driver path for Windows machine?

Ответить
Ben Summerhayes
Ben Summerhayes - 24.03.2023 16:19

A good tutorial to get me going in the right direction. I had to add "await driver.manage().setTimeouts({implicit: 3000});" after the url call as it was too quick and not finding the elements

Ответить
Samar emad
Samar emad - 05.03.2023 10:32

Hello Ryan, really it is good tutorial but i faced problem when i called node test/firstTest.js nothing happened
please help me urgently i need to do that task

Ответить
Ahmed Khaled
Ahmed Khaled - 10.02.2023 00:03

Hi Ryan ! This a very helpful Tutorial , appreciate your great job . Thank you so much for your hard work.👍

Ответить
Abigail Mariano
Abigail Mariano - 07.02.2023 18:57

This is very helpful for beginners like me. As a token of appreciation, I didn't skip the ads :) Thank you very much Sir Ryan Howard and the team!

Ответить
Justyna
Justyna - 07.02.2023 16:28

Hello Ryan, this is a great tutorial on testing in the Mocha framework. Thank you so much for your hard work 🙏💗 I've been learning JavaScript for just a few months and this tutorial is VERY clear and understandable to follow. Great job 👍

Ответить
Mikael Filo
Mikael Filo - 31.01.2023 22:12

Very helpful, professional and understandable video tutorial. I learned a lot in less than 3 hours and definitely I highly recommend.

Ответить
an.na
an.na - 08.01.2023 22:02

I installed Mocha, wrote these describe and it functions and wanted to run the test. Unfortunately I have an error:
Error: Not supported
at Object.exports.doImport (/var/www/html/ania/newProject_git/node_modules/mocha/lib/nodejs/esm-utils.js:35:41)
at formattedImport (/var/www/html/ania/newProject_git/node_modules/mocha/lib/nodejs/esm-utils.js:9:28)
at Object.exports.requireOrImport (/var/www/html/ania/newProject_git/node_modules/mocha/lib/nodejs/esm-utils.js:42:34)
at Object.exports.loadFilesAsync (/var/www/html/ania/newProject_git/node_modules/mocha/lib/nodejs/esm-utils.js:100:34)
at Mocha.loadFilesAsync (/var/www/html/ania/newProject_git/node_modules/mocha/lib/mocha.js:447:19)
at singleRun (/var/www/html/ania/newProject_git/node_modules/mocha/lib/cli/run-helpers.js:125:15)
at exports.runMocha (/var/www/html/ania/newProject_git/node_modules/mocha/lib/cli/run-helpers.js:190:10)
at Object.exports.handler (/var/www/html/ania/newProject_git/node_modules/mocha/lib/cli/run.js:370:11)
at innerArgv.then.argv (/var/www/html/ania/newProject_git/node_modules/yargs/build/index.cjs:443:71)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

Process finished with exit code 1

I thought that maybe I should update something but in package.json document everything looks fine. What's the problem? :(

{
"name": "newproject",
"version": "1.0.0",
"description": "Selenium Example Project",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Ann",
"license": "MIT",
"dependencies": {
"chai": "^4.3.7",
"chromedriver": "^108.0.0",
"mocha": "^10.2.0",
"node": "^19.3.0",
"selenium-webdriver": "^4.7.1",
"webdriver": "^8.1.3"
}
}
I also have another project, running on the same computer, probably with older version of node and mocha and everything works there.

Ответить
Stevan Oliveira
Stevan Oliveira - 14.12.2022 00:20

Hello. I'm stuck at the beginning, when I first try to launch firefox using the command 'node tests/firstTest.js' nothing happens when I send it. I have already downloaded the browser and also put the gecko path as an environment variable =/

Ответить
A Guest
A Guest - 23.11.2022 09:39

let appState = {
"recentDestinations": [
{
"id": "Save as PDF",
"origin": "local"
}
],
"selectedDestinationId": "Save as PDF",
"version": 2
}

let profile = {"download.default_directory": "./downloads", 'printing.print_preview_sticky_settings.appState': JSON.stringify(appState)}

const chromeOptions = new chrome.Options()
//chromeOptions.excludeSwitches("enable-logging")
chromeOptions.addArguments("--kiosk-printing")
chromeOptions.setUserPreferences(profile)
chromeOptions.detachDriver(true)

let chromeCapabilities = Capabilities.chrome();

//Setting chrome options
chromeCapabilities.set("goog:chromeOptions", {
args: [
"--lang=en",
"disable-infobars",
"detach=true"
],
prefs: {"download.default_directory": "./downloads"}
})
driver = await new Builder().forBrowser("chrome").setChromeOptions(chromeOptions).withCapabilities(chromeCapabilities).build()

What am I doing wrong here? I am trying to figure out how to get a driver.executeScript("windows.print()") to cause a name PDF save somewhere but cannot quite figure out how.

Ответить
Javastaker
Javastaker - 20.11.2022 19:48

Greetings, my browser Chrome, closes a few seconds after executing the function example.

Ответить
Erik Flickinger
Erik Flickinger - 14.11.2022 23:39

Is this posted somewhere else in better quality? 720p is terrible.

Ответить
Jhonys Fernando Vallejo Acevedo
Jhonys Fernando Vallejo Acevedo - 04.11.2022 21:31

these videos were really useful, thanks a lot.

Ответить
Martín Salinardi
Martín Salinardi - 25.10.2022 23:02

amazing work, very clear and instructive👏🏻 highly recomended 🙌🏻

Ответить
Tatjana Vasovic Bursac
Tatjana Vasovic Bursac - 25.09.2022 19:12

This course was an eye-opening, since I've done automation in Cypress only, and once I saw how you included Mocha and Chai assertions it basically looks the same to me...So can you explain to me if there's difference in the code writing, between those two automation tools, meaning Cypress and Selenium?

Ответить
Tarek Hammami
Tarek Hammami - 10.09.2022 12:19

Cheers mate, that helped a lot

Ответить
Robert Świderski
Robert Świderski - 07.09.2022 00:04

Hi i have problem with running an example from your tutorian on lambda test cloud. Locally it was working fine. But after modufication of script from chapter 7 (adding cloud Lambda test) I receive an error after npm test in terminal
"" 1 passing (6s)
1 failing

1) Uncaught error outside test suite:
Uncaught ReferenceError: capabilities is not defined"

Any idea whot might be wrong?

Ответить
Daniel Araujo
Daniel Araujo - 24.08.2022 03:57

Awesome tutorial.
how can i make the test close the browser when gets a error?
in my test it continues open.

Ответить
X-Men
X-Men - 18.08.2022 17:38

Hello sir, how can I scroll up and down. Because some web page don't load all results, they load dynamically when you scroll down. So how can I able to scroll up and down.

Please help

Ответить
Mohammad Mohseni
Mohammad Mohseni - 13.08.2022 12:00

hello thank you for your very good toturial. 😍
in section 6 your path for customizeDir is under the camera layer and not defined.🥲

Ответить
Nikita Novikov
Nikita Novikov - 03.08.2022 23:15

Best tutorial i've ever seen on Selenium. Thank you so much! I only wish i could like this video second time!

Ответить
LD
LD - 08.07.2022 21:42

Finally not indian tutorial...

Ответить
Levani Gogaladze
Levani Gogaladze - 06.07.2022 23:39

It is always hard for me to set up mocha configuration on javascript it always gives me errors like that. Error: No test files found: "test", ReferenceError: describe is not defined. I searched it on StackOverflow but it does not make sense.

Ответить
Gelo Tilaon
Gelo Tilaon - 27.06.2022 12:01

Thank you! Big help!

Ответить
Video Portal For Testing
Video Portal For Testing - 17.06.2022 10:30

Cool video!

Ответить
Pong Tester
Pong Tester - 03.06.2022 23:09

nice

Ответить
Cassiano Moura
Cassiano Moura - 02.06.2022 17:08

Thanks to Lambda Test for all this content, and thank you, Ryan, for share this with us.

Ответить
Kyreon
Kyreon - 27.05.2022 22:48

Loved this tutorial, everything is well explained and you helped me understand some concepts and the reason behaind them. Keep bringing this kind of content!

Ответить
John Farrell
John Farrell - 25.05.2022 23:20

After running the parallel command "npm test" where test="mocha --no-timeouts -parallel" it only runs 1 js test successfully and the second test window remains open and does not navigate to the todo website. Any ideas what could be issue ?

Ответить
Gabriel Whitehair
Gabriel Whitehair - 25.05.2022 07:35

Good content.

Ответить
R K
R K - 07.05.2022 03:02

How to run the selenium code in the html page with the invoke of a button. You told to run from the terminal. It is fine. Please tell me how to run it from the html page with the click of a button.

Ответить
cool bang
cool bang - 07.04.2022 09:06

great video.. do you have tutorial for js implementation of cdp or bidi? network intercept or other examples would been great

Ответить