Protractor e2e testing Intro | Step by step setup to run tests using typescript

  Рет қаралды 31,593

qavbox

qavbox

Күн бұрын

#qavbox_protractor_ts
This video will explain -
Why to use protractor e2e test
Protractor architecture
What is typescript and how to run typescript
An easy and effective way of installing protractor and typescript
Run a protractor test using typescript
Code sample - github.com/sun...
Blog - qavalidation.c...
Subscribe, and share if you get benefited from this tutorial...

Пікірлер: 52
@kuchyc
@kuchyc 4 жыл бұрын
Thank you. By far the best video I have come across! Although Typescript is new to me, I stumbled a bit but determination and a well explained tutorial, I got 2 pages automated in a few hours. Thanks again.
@piyushmathpal4244
@piyushmathpal4244 4 жыл бұрын
can you please help me out Iam getting an error when i run node_modules/typescript/bin/tsc --init ...it says : Program 'tsc' failed to run: No application is associated with the specified file for this operationAt line:1 char:1 + node_modules/typescript/bin/tsc --init + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~. At line:1 char:1 + node_modules/typescript/bin/tsc --init + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException + FullyQualifiedErrorId : NativeCommandFailed
@mohapatradharitree
@mohapatradharitree 5 жыл бұрын
well explained..Thanks a lot for sharing the video
@MalusiShepherdNinela
@MalusiShepherdNinela 4 жыл бұрын
This helped me so much
@chengaiahponkam2019
@chengaiahponkam2019 5 жыл бұрын
Good explanation
@imtiazshaik1543
@imtiazshaik1543 4 жыл бұрын
It is very Good explanation, Thanks a lot. Could you please create one Video related to CUCUMBER with Protractor from Scratch.. From Folder structure.
@ChiragPatel-lk1vl
@ChiragPatel-lk1vl 4 жыл бұрын
Thanks , very nice video , Could you please start series for Cypress
@vermaishaan6987
@vermaishaan6987 5 жыл бұрын
Hello , Thanks for this useful video.I am getting "Invalid or corrupt jarfile" while starting webdriver.Please help to overcome this issue Thanks
@kirankumar3704
@kirankumar3704 3 жыл бұрын
Can u do video on canvas testing? I have a use case where I need to draw a line on image and check if line is drawn
@nekkantisandeepkumar7760
@nekkantisandeepkumar7760 3 жыл бұрын
What is the difference between the dependencies and devDependencies? Could you please explain!
@waranuchpansuwan9703
@waranuchpansuwan9703 2 жыл бұрын
I see this error. Did I missed something? Property 'toContain' does not exist on type 'void'.ts(2339)
@abhedpatil
@abhedpatil 5 жыл бұрын
Thanks for the video, very helpful. I have been practicing on the side as i watch..having issues creating the tsconfig file. Package.json is exactly similar to yours PS D:\Automation\Projects\protractor> node_modules/typescript/bin/tsc --init Program 'tsc' failed to run: No application is associated with the specified file for this operationAt line:1 char:1 + node_modules/typescript/bin/tsc --init + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~. At line:1 char:1 + node_modules/typescript/bin/tsc --init + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException + FullyQualifiedErrorId : NativeCommandFailed
@abhedpatil
@abhedpatil 5 жыл бұрын
figured it out.. had to switch from powershell to bash
@anilkumarm9072
@anilkumarm9072 4 жыл бұрын
@@abhedpatil hello abhed i am also facing same problem, can u resolve...otherwise i can get your mail id
@saravananravikumar2775
@saravananravikumar2775 5 жыл бұрын
Getting this error "#!/usr/bin/env node require('../lib/tsc.js') " while running this code in terminal "node_modules/typescript/bin/tsc --init" How to resolve this issue ?
@piyushmathpal4244
@piyushmathpal4244 4 жыл бұрын
me to...does ur problem got resolved?
@anilkumarm9072
@anilkumarm9072 4 жыл бұрын
To configure tsconf.js file is not existing after clicking nodemodule/typescripit/bin/tsc ---int
@PankajKumar-su5dq
@PankajKumar-su5dq 4 жыл бұрын
I am getting "E/configParser - Error message: configuration file outputjs/conf.js did not export a config object" error. Tried taking few suggested helps from Stackoverflow but no luck, can you please help.
@varshatyagi6392
@varshatyagi6392 4 жыл бұрын
Hi, When I'm creating calculator.ts & writing describe. Getting below error "Cannot find name 'describe'." However not getting this error if i replace name as calculator.js
@pratikkkothari3198
@pratikkkothari3198 3 жыл бұрын
isnt it much simple to use with js files only , the setup comes readily available on installing protractor, whats advantage of using all this config for Typescript if it gets compiled to js again
@sailuvsl1865
@sailuvsl1865 5 жыл бұрын
Hi... When I'm running the config.js.. I'm getting protractor_1.by.xpath is not a function.. Can some one help me on this.
@aritrashit
@aritrashit 5 жыл бұрын
I am getting below error while running >> npm test ---- 'node_modules' is not recognized as an internal or external command, operable program or batch file. If I remove the node_modules from script tag of package.json then below error shows after running >> npm test ---- Error: Error: more than one config file specified at C:\Users\Username\Desktop\Protactor\Protractordemo ode_modules\protractor\built\cli.js:166:15 at C:\Users\Username\Desktop\Protactor\Protractordemo ode_modules\optimist\index.js:307:21 at Array.forEach () at parseArgs (C:\Users\Username\Desktop\Protactor\Protractordemo ode_modules\optimist\index.js:305:16) at Object.Argv.self.parse (C:\Users\Username\Desktop\Protactor\Protractordemo ode_modules\optimist\index.js:140:16) at Object. (C:\Users\Username\Desktop\Protactor\Protractordemo ode_modules\protractor\built\cli.js:169:21) at Module._compile (internal/modules/cjs/loader.js:799:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10) at Module.load (internal/modules/cjs/loader.js:666:32) at tryModuleLoad (internal/modules/cjs/loader.js:606:12) npm ERR! Test failed. See above for more details.
@chengaiahponkam2019
@chengaiahponkam2019 5 жыл бұрын
I think install protractor globaly
@anitashaw5479
@anitashaw5479 4 жыл бұрын
hi, I am getting this error when running npm test command........Error: TypeError: Target browser must be a string, but is ; did you forget to call forBrowser()? whatever you showed in this video, i followed the same. Could you please guide..i stuck in running the calculator test case?
@qavbox
@qavbox 4 жыл бұрын
Make sure you are sending url as string inside the browser.get("") Share your code if issue still exist
@manasranjan3854
@manasranjan3854 3 жыл бұрын
Hi, when I run calculator.js test suite after referring your steps it runs successfully but at the console i get No Specs Found" , can you please help with this?
@qavbox
@qavbox 3 жыл бұрын
Make sure the output folder has been created and there is spec folder with all converted js files.
@manasranjan3854
@manasranjan3854 3 жыл бұрын
@@qavbox yes i can see calculator.js file gets created with the following contents.."use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var protractor_1 = require("protractor"); describe('calculator test', function () { beforeEach(function () { protractor_1.browser.get("juliemr.github.io/protractor-demo"); }); it('Launch url check', function () { expect(protractor_1.browser.getTitle()).toContain("Super"); }); it('Add two numbers', function () { protractor_1.element(protractor_1.by.model("first")).sendKeys("23"); protractor_1.element(protractor_1.by.model("second")).sendKeys("23"); protractor_1.element(protractor_1.by.id("gobutton")).click(); }); });
@manasranjan3854
@manasranjan3854 3 жыл бұрын
one more thing I want to add, in my conf.ts file i have added specs properties as specs:['outputjs/specs/caculator.js'], Note - i am working on WIndows environemnt...Thanks for your prompt reply sir
@ErikAkerman
@ErikAkerman 5 жыл бұрын
I try to use the following command just like the video: it("add 2 numbers", function(){ element(by.model("first").sendKeys("12"); }) but get the following error: Property 'sendKeys' does not exist on type 'ProtractorLocator'.ts(2339) Does anybody know? Feels typical that each time you try to start learning a new programming topic you always get stuck at the setup phase. :/
@Siva-en9sw
@Siva-en9sw 5 жыл бұрын
i guess its happening because of the missing ; in the end it("add 2 numbers", function(){ element(by.model("first").sendKeys("12"); });
@nimmyranjeeth5267
@nimmyranjeeth5267 5 жыл бұрын
Hi while running tsc sampletest.ts I am receiving the following error node_modules/@types/selenium-webdriver/remote.d.ts:139:29 - error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later. 139 setEnvironment(env: Map | {[name: string]: string} | null): this;
@nimmyranjeeth5267
@nimmyranjeeth5267 5 жыл бұрын
changing to es2015 did not fix the issue.
@shajahanfsr59
@shajahanfsr59 5 жыл бұрын
I am getting below error while executing the command "npm test" Note: I tried by updating the "scripts": { "start": "node your-script.js" } Error: PS E:\ProtractorDemo> npm test > protractordemo@1.0.0 pretest E:\ProtractorDemo > npm run tsc npm ERR! missing script: tsc npm ERR! npm ERR! Did you mean this? npm ERR! tsc npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Saajan.D\AppData\Roaming pm-cache\_logs\2019-04-09T09_37_48_080Z-debug.log npm ERR! Test failed. See above for more details.
@rajendrank9582
@rajendrank9582 4 жыл бұрын
try to install typescript manually and run it
@uvitalkumar
@uvitalkumar 4 жыл бұрын
@@rajendrank9582 No use, the Same issue getting
@rajendrank9582
@rajendrank9582 4 жыл бұрын
@@uvitalkumar create a .ts file and frm cmd just run tsc filename. See what result u getting
@uvitalkumar
@uvitalkumar 4 жыл бұрын
@@rajendrank9582 Here, the error, PS E:\Automation\ProtractorPOM> tsc conf.ts node_modules/@types/selenium-webdriver/http.d.ts:24:14 - error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later. 24 headers: Map; ~~~ node_modules/@types/selenium-webdriver/http.d.ts:48:14 - error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later. 48 headers: Map; ~~~ node_modules/@types/selenium-webdriver/remote.d.ts:139:29 - error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later. 139 setEnvironment(env: Map | {[name: string]: string} | null): this; ~~~ node_modules/protractor/built/index.d.ts:5:10 - error TS2440: Import declaration conflicts with local declaration of 'PluginConfig'. 5 import { PluginConfig, ProtractorPlugin } from './plugins'; ~~~~~~~~~~~~ node_modules/protractor/built/index.d.ts:5:24 - error TS2440: Import declaration conflicts with local declaration of 'ProtractorPlugin'. 5 import { PluginConfig, ProtractorPlugin } from './plugins'; ~~~~~~~~~~~~~~~~ Found 5 errors.
@uvitalkumar
@uvitalkumar 4 жыл бұрын
I am not able to run, getting these errors. outputdirectoty is generating but tests are not executing
@ErikAkerman
@ErikAkerman 5 жыл бұрын
Hello, at (33.03) i "write node_modules/typescript/bin/tsc SampleTS.ts" Instead of a javascript file beeing created windows tries to open a unknown file. Cannot open :TSC files. Do you know why this is or workaround? I would love to be able to continue this tutorial.. :/
@ErikAkerman
@ErikAkerman 5 жыл бұрын
I solved this by removing "typescript" node_modules/.bin/tsc SampleTS.ts
@swapnapatil8907
@swapnapatil8907 5 жыл бұрын
After npm init command, I don’t see package.json created for me
@Siva-en9sw
@Siva-en9sw 5 жыл бұрын
For me even protractor config.js is not opening in VSC terminal. Guess there is a sort of bug, but try running the same in any OS command prompt or terminal. It worked in my case.
@mengunuokerhuo9163
@mengunuokerhuo9163 5 жыл бұрын
Make sure your path(should be under the created folder. eg: C:\filename\foldername> npm init) is correct
@nishanttembhurnikar07
@nishanttembhurnikar07 5 жыл бұрын
Hi anyone can help me...to initialize tsc,I am giving node_modeles/typescript/bin/tsc --init but instead of initializing it's openings that tsc file in my vsCode
@sirishakusuma
@sirishakusuma 3 жыл бұрын
yes. it happened to me also. doing a tsc --init created a tsconfig.json file
@TheNishi42
@TheNishi42 6 жыл бұрын
There is lot of confusion with ts files.. can you share the contact details so that we can clear our doubts.
@qavbox
@qavbox 6 жыл бұрын
ok, u can reach me on sunilpatro1985@gmail.com
@ravibtps
@ravibtps 5 жыл бұрын
after executing node_modules/typescript/bin/tsc --init command it's open the file … it is not creating tsconfig.json file .What to do here ?
@haramohapatra8077
@haramohapatra8077 5 жыл бұрын
node_modules/.bin/tsc --init
@haramohapatra8077
@haramohapatra8077 5 жыл бұрын
try it
@ErikAkerman
@ErikAkerman 5 жыл бұрын
I had the same problem. Thank you for the answer, Hara!
Run Protractor e2e test on Firefox browser
6:48
qavbox
Рет қаралды 3,8 М.
Implement page object model (POM) in protractor typescript
32:17
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 26 МЛН
规则,在门里生存,出来~死亡
00:33
落魄的王子
Рет қаралды 27 МЛН
Angular Cypress: Learn How To Install And Run E2E Tests
21:38
Code Shots With Profanis
Рет қаралды 16 М.
Test-Driven Development // Fun TDD Introduction with JavaScript
12:55
The Best Programmer I Know • Daniel Terhorst-North • GOTO 2024
48:33
GOTO Conferences
Рет қаралды 58 М.
"The Life & Death of htmx" by Alexander Petros at Big Sky Dev Con 2024
23:01
Montana Programmers
Рет қаралды 61 М.
Protractor Beginner Tutorial 14 | How to run Protractor tests from Jenkins
15:11
Automation Step by Step
Рет қаралды 13 М.
Setup and run typescript code in VSCode
17:58
qavbox
Рет қаралды 24 М.
Why Vertical LLM Agents Are The New $1 Billion SaaS Opportunities
37:06
Configuring Protractor with Cucumber in VSCode | Reporting
24:54
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 26 МЛН