WebDriverIO - Installation & Setup - Part -2

Sdílet
Vložit
  • čas přidán 23. 08. 2024
  • #webdriverio #nodejs #javascript #automation
    In this video, I have explained how to install WebDriverIO and setup WebDriverIO project in Visual Studio Code.
    What is WebdriverIO?
    WebdriverIO is a custom implementation for selenium's W3C webdriver API. It is written in Javascript and packaged into 'npm' and runs on Node.js.
    Webdriver IO Installation:
    1. Java
    2. Node.js installation
    3. NPM installation
    4. open terminal/command line:
    node -v
    npm -v
    4. install VSC editor
    5. webdriver setup and installation commands:
    -- npm init
    -- npm install webdriverio --save-dev
    -- npm install @wdio/cli
    -- ./node_modules/.bin/wdio config
    -- npm install chai --save-dev
    -- npm install chai-webdriverio --save-dev
    -- npm install local-runner --save-dev
    ~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
    www.youtube.co...
    Follow me on my Facebook Page:
    / naveenqtpexpert
    Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
    t.me/joinchat/...
    Paid courses (Recorded) videos:
    Java & Selenium Course: www.naveenautom...
    API Course: www.naveenautom...

Komentáře • 120

  • @purushottamvyas3384
    @purushottamvyas3384 Před 4 lety

    Thanks Naveen, Using WDIO for a long time, recently started with Typescript. Just saw a proper tutorial by you. Great.

  • @pramodmallick5746
    @pramodmallick5746 Před 4 lety

    Very good info for basic learners, Thank you for your help. One thing I would like to add is If this is a test only repo, then we can only distribute dependencies not devDependencies. The dev dependencies is required while developing only, not while executing.

  • @chiragmittal2720
    @chiragmittal2720 Před 3 lety

    Thanks Naveen ... you are doing such an awesome piece of help to all automation lovers :)

  • @hemajirage8497
    @hemajirage8497 Před 2 lety

    Thank you so much naveen. This is really a great session ✌👌

  • @suprabathj7843
    @suprabathj7843 Před 4 měsíci

    Very good , thanks Naveen

  • @ajea-z2979
    @ajea-z2979 Před 2 lety

    Awesome , i like this training and way of explaining

  • @jaishrikrishna2771
    @jaishrikrishna2771 Před 4 lety

    Thanks.. such complex thing in so simple way

  • @naveenprakash82
    @naveenprakash82 Před 4 lety +1

    Hey Naveen, Its amazing video. I really liked it super simple. Looking for more videos like this. One quick question:- Do you have any video to integrate with saucelabs as well?

  • @supriyamishra5968
    @supriyamishra5968 Před 4 lety +1

    husssh!! finally I installed. thanks naveen

  • @ajeetsingh7746
    @ajeetsingh7746 Před 2 lety

    Hi Naveen Sir,
    Thanks a lot!!!
    Great Video for training. One question I have I am using webdriverIO with mocha Javascript using for mobile automation I wanted to priortize my test cases to run in the priority kindly help me out with What is the command to priortize the test cases.
    Thanks,
    Ajeet

  • @tarunkrishnaswamy8207
    @tarunkrishnaswamy8207 Před 3 lety +1

    Hey Naveen,
    Thanks for the great content!
    I think we might need some changes here...
    My current dependencies look like this
    "devDependencies": {
    "@rpii/wdio-html-reporter": "^6.3.2",
    "@wdio/allure-reporter": "^7.5.3",
    "@wdio/crossbrowsertesting-service": "^5.10.0",
    "@wdio/local-runner": "^7.5.4",
    "@wdio/mocha-framework": "^7.5.3",
    "@wdio/selenium-standalone-service": "^7.5.3",
    "@wdio/spec-reporter": "^7.5.3",
    "chai": "^4.3.4",
    "chai-webdriverio": "^1.0.0",
    "chromedriver": "^90.0.0",
    "local-runner": "*",
    "wdio-chromedriver-service": "^7.0.0",
    "wdio-docker-service": "^3.1.2",
    "webdriverio": "^7.5.3"
    },
    Observations:
    1. I had a compatibility issue with chai and chai-webdriverio and had to use --force for installation
    2. I also had difficulty when adding services to the setup ... was not allowed to select both chromedriver and selenium-standalone driver.
    3. I had to --force install local-runner and notice the version is set to "*" -- I don't know what this means
    Please help me out if you see this!
    I wanted to keep it short. If there are more logs needed, please let me know.
    Hi5 to the great content again!

  • @sayantanimukherjee9722

    Hi Naveen,
    I have one query. Let's say, if I'm setting up the wdio config file for a native mobile project, should I be selecting "Appium " instead of selenium-standalone as a service?

  • @venkatjakkepalli4833
    @venkatjakkepalli4833 Před 4 lety

    Hi Naveen,
    pls upload more videos on webdriverio ASAP..
    and also upload the topics on reporting and what is the replica of testng here and how we can group and giving priority and order of execution of test cases as like in Testng..

  • @sandeepkumar-vs5ju
    @sandeepkumar-vs5ju Před 4 lety +1

    Thanks Naveen for detailed guidelines, plz share something on webdriverio + appium integration script creation

  • @jessicadas531
    @jessicadas531 Před 3 lety

    Hi Naveen, why are we installing all the modules as Dev-dependencies?

  • @gireeshkumarhanumara
    @gireeshkumarhanumara Před 3 lety

    Thank you so much Naveen.
    I missed to run save command, it's daily making to run all the commands. Hope it will solve my issue.👍

  • @sowjanyalakkakula321
    @sowjanyalakkakula321 Před 3 lety

    Hi Naveen I am using Cucumber as part of my project requirement. Please may i ask if I have to use any before test commands for test execution. Thanks

  • @avishekbehera
    @avishekbehera Před 4 lety

    Thanks Naveen.
    While adding configuration in wdio config file for BeforeTest(), I could see you have autocomplete for const chai , global.expect etc.. However I didn't get. Had to type manually.
    I was wondering did I miss anything?

  • @Ashokkumarg8
    @Ashokkumarg8 Před 4 lety

    Instead of Mocha, If Cucumber is used, should we write this under
    before:function?

  • @chennaiguys07
    @chennaiguys07 Před 4 lety

    Hi Naveen, you have selected Mocha test here. What we need to update in wdio.config when using cucumber?

  • @sireeshapanchagnula8544

    This is really helpful. But am stuck while using npm install since behind the firewall.
    Could you please let me know how do I change proxy settings .
    We have our own repository to download all artifatcs .. please help here 🙏

  • @shraddhanalawade4979
    @shraddhanalawade4979 Před 11 měsíci

    Hi Naveen, how to bypass your connection is not private error on chrome through Webdriver IO javascript automation

  • @kanhaiyatulsyan7560
    @kanhaiyatulsyan7560 Před rokem

    so every time we make a new project we have to do all these steps?

  • @ramyathupalli509
    @ramyathupalli509 Před 4 lety

    Hey Naveen. Past three days I'm Searching for screenshot comparison using webdriverio. Not even one useful video is there on CZcams. I think this is the good time to come up with a video. Awaiting for the video. Really important to me. Thanks

    • @naveenautomationlabs
      @naveenautomationlabs  Před 4 lety +1

      Hi Ramya, Screenshot comparison is not a selenium or WebDriverIO job. You need to use some third part tool or library for the image comparison. If you use Selenium/Webdriver with Javascript, there are some libraries to compare screenshots:
      Resemble.JS => Compare two images and find the difference. Resemble.js can be used for any image analysis and comparison requirement you might have in the browser.
      TemplateMatching.JS => Image search: Find another image (e. g. a button) inside a bigger image (e. g. a screenshot)

    • @ramyathupalli509
      @ramyathupalli509 Před 4 lety

      @@naveenautomationlabs
      Thanks Naveen. Thanks for the quick response. Will try it out and get back to you very soon. Thanks again

  • @demo-mz5xz
    @demo-mz5xz Před 2 lety

    Hi Naveen, can i refer these videos to automate angular js application using webdriverIO

  • @vinayraj6685
    @vinayraj6685 Před 2 lety

    HI Naveen I think the webdriverio has been updated so can you make the new video for the new setup as we can see the documents of webdriverio it's different now

  • @bhavyagowda8116
    @bhavyagowda8116 Před 2 lety

    How to upload files in webdriverio and in my case we are not having input tag , after clicking on browser link window explorer will open so need to select files from window explorer dialogue box

  • @lucifieramit1
    @lucifieramit1 Před 4 lety

    Hi Naveen will you be doing more vedios on Taiko as well

  • @kanthim9107
    @kanthim9107 Před rokem

    Naveen - Chai 4.3.7 is installed. In webdriverio it shows the chai version as 4.0.1. How to resolve the conflict

  • @priyankasharma-iv9mu
    @priyankasharma-iv9mu Před 2 lety

    Hi.. all of a sudden am getting error in my working suite... 'error at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)'
    I tried with a new setup as well ... deleting and reinstalling nodejs but nothing helps. Kindly let me know what could be possible reasons for this

  • @folsomindian
    @folsomindian Před 2 lety

    Hi Naveen, I am getting error after installing local runner. its compatibility issue but not sure how to fix it.

  • @pranaykumar4062
    @pranaykumar4062 Před 4 lety

    Can you please explain difference between jasmine and mocha frameworks in one video.
    Thanks

  • @vivaan2011
    @vivaan2011 Před 4 lety

    Thanks a ton Naveen!! Great video!! but a question I selected cucumber as framework(that is my project requirement). u selected Mocha and u were writing before function before running a test. what do we have do if we are using cucumber framework. i dont see a beforetest for cucumber. please let us know. it will be great help.

    • @19863960
      @19863960 Před 4 lety

      kavita can u tell me which is more demanding right now protector or cypress or webdriver io

  • @suwigyarathore2990
    @suwigyarathore2990 Před 4 lety

    Does it always need JAVA installed on machine or there is an alternative

  • @venkatjakkepalli4833
    @venkatjakkepalli4833 Před 4 lety

    Hi naveen,
    How to Automate the download and cancel using webdriverio and how we can assert the downloaded file name.

  • @vinodkollu7430
    @vinodkollu7430 Před 3 lety

    @Naveen I am getting below error
    ERROR @wdio/runner: BrowserslistError: Unknown browser query `basedir=$(dirname "$(echo "$0" | sed -e 's`. Maybe you are using old Browserslist or made typo in query.

  • @meghakalal2918
    @meghakalal2918 Před 2 lety

    Hey Naveen while I am trying to add global dependencies I am getting errors
    Can you please help me ?

  • @keshavnayak2812
    @keshavnayak2812 Před 3 lety

    can you please do a video on appium set-up with webdriverio

  • @AdityaKumar-iy8vl
    @AdityaKumar-iy8vl Před 2 lety

    Please help me!
    This error is showing
    @wdio/local-runner: Failed launching test session: Error: Couldn't find plugin "html" reporter, neither as wdio scoped package "@wdio/html-reporter" nor as community package "wdio-html-reporter". Please make sure you have it installed!

  • @lokesh4391
    @lokesh4391 Před 4 lety +1

    Hi Team ,
    After installating
    -- npm init
    -- npm install webdriverio --save-dev
    I am not able to find the below path in my system
    ie.,
    PS C:\webdriverioLearning
    ode_modules\.bin> cd ./node_modules/.bin/wdio config
    cd ./node_modules/.bin/wdio config
    Set-Location : A positional parameter cannot be found that accepts argument 'config'.
    At line:1 char:1
    + cd ./node_modules/.bin/wdio config
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Set-Location], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SetLocationCommand

  • @vasistatiruveedi690
    @vasistatiruveedi690 Před 3 lety

    pls upload videos on WebDriverIO-native app automation

  • @binitpatel
    @binitpatel Před 4 lety

    Naveen thank you so much. This is really helpful. But I am getting this error and so I am going with standalone and not the chromedriver. Is that okay? wdio-chromedriver-service cannot work together with @wdio/selenium-sta
    ndalone-service
    @wdio/selenium-standalone-service already includes chromedriver
    Please uncheck one of them.

    • @sssaamm29988
      @sssaamm29988 Před 3 lety

      even i got this error so i unchecked on of them

  • @giridhartupuri7273
    @giridhartupuri7273 Před 4 lety

    Done With the setup

  • @arvindsah3273
    @arvindsah3273 Před 4 lety +2

    Hello @Naveen, Thanks for making this video. I tried settings up the basic set-up explained in video, however I got stuck at this command post setting-up the wdio/cli - *"./node_modules/.bin/wdio config"*. I tried setting up the things from beginning on another system but result was same.
    Upon doing some more research found something on this link (webdriver.io/docs/clioptions.html), running another command "npx wdio config" will do the same job of setting up the file "wdio.config.js".
    *Question*- want to check if the above command of "npx wdio config" will do the same job as *"./node_modules/.bin/wdio config"* OR will it create some problem later on?
    Error logs-

    ode_modules\.bin\wdio.ps1 cannot be loaded
    because running scripts is disabled on this system. For more information, see about_Execution_Policies at
    https:/go.microsoft.com/fwlink/?LinkID=135170.
    At line:1 char:1
    + ./node_modules/.bin/wdio config
    + ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

    • @sourabhtiwari186
      @sourabhtiwari186 Před 4 lety +4

      Hi Arvind,
      Please try this.
      On Search menu search for : PowerShell
      Right Click on it> Run As Administrator
      once PowerShell is opened, type the following command
      Get-ExecutionPolicy (You should see it as "Restricted")
      Now, Type the command:
      Set-ExecutionPolicy remotesigned (Hit enter)
      After completion again check the: Get-ExecutionPolicy (you should see remoteSigned)
      Hope this helps.
      Thanks!

    • @suhasramchandra
      @suhasramchandra Před 4 lety

      If it is window then you have to use "\" instead of "/"

    • @arvindsah3273
      @arvindsah3273 Před 4 lety

      @@sourabhtiwari186it worked I don't had to make any changes... Above solution was working. Thanks for the response.

    • @arvindsah3273
      @arvindsah3273 Před 4 lety

      @@suhasramchandra thanks for the input. With the new release of webdriverioIO 6 things have become much more easy.

    • @thestrollsapien9148
      @thestrollsapien9148 Před 4 lety +2

      npx wdio config works

  • @ananyasarkar950
    @ananyasarkar950 Před 4 lety

    Hi, thanks for the video series. I am new to webdriverio and am following your videos, those are quite informative & interesting.
    Now, i am having two issues:
    1) when I am trying to add the config file using ./node_modules/.bin/wdio config command, it is showing "found 5 high severity vulnerabilities" and after that whatever command I am using to install chai & chai-webdriverio etc. it is showing the same number of vulnerabilities, and after local-runner installation it shows "found 14 high severity vulnerabilities".
    npm audit fix is not resolving the vulnerabilities. Can you please suggest how to resolve?
    2) I continued with the installation with the vulnerabilities above, and now when I am trying to run the test using npm run test, it is showing the below error:
    interaction with webelement
    enter value in a field:
    ReferenceError: browser is not defined
    Please help me in resolving these issue.

    • @malihdabboussi5143
      @malihdabboussi5143 Před 3 lety

      True, while I was proceeding with the installation i noticed about 5 vulnerabilities and I stopped the installation and I am trying to solve the issue but with no luck, and i am wondering if you did solve it.

    • @ShivaKumar-gb5nf
      @ShivaKumar-gb5nf Před 3 lety

      try issuing 'npm audit fix' command

  • @ahobilams
    @ahobilams Před 2 lety

    How to launch browser for each and every example

  • @testautomationlab
    @testautomationlab Před 4 lety

    Thanks Naveen for the Video, at 14:16 , you are selecting chromedriver and selenium-standalone services together ,But when I am trying to do the same I get below error --
    wdio-chromedriver-service cannot work together with @wdio/selenium-standalone-service
    @wdio/selenium-standalone-service already includes chromedriver
    Please uncheck one of them.

    • @cyrilgeorge870
      @cyrilgeorge870 Před 4 lety

      I too got the same suggestion and i have unselected selenium standalone and proceeded further

    • @gurumahadev5702
      @gurumahadev5702 Před 4 lety

      Hi @@cyrilgeorge870, i am also facing same issue. Ignoring the selenium standalone will not cause any issue during course.

  • @mahmudulanam5651
    @mahmudulanam5651 Před 4 lety

    Hi Naveen
    Thanks for the detail installation
    While executing this command I have got the following error
    ./node_modules/.bin/wdio config
    '.' is not recognized as an internal or external command,
    operable program or batch file.

    • @thestrollsapien9148
      @thestrollsapien9148 Před 4 lety +1

      npx wdio config

    • @aldwintest3828
      @aldwintest3828 Před 4 lety

      me too. i also tried npx wdio config but it seems it points to the do '.'

    • @aldwintest3828
      @aldwintest3828 Před 4 lety

      this is the error = > > Error: Package exports for 'D:\workfolder
      ode_modules\uuid' do not define a valid '.' target
      at resolveExportsTarget (internal/modules/cjs/loader.js:460:13)
      at resolveExports (internal/modules/cjs/loader.js:393:16)
      at Function.Module._findPath (internal/modules/cjs/loader.js:492:20)
      at Function.Module._resolveFilename (internal/modules/cjs/loader.js:787:27)
      at Function.Module._load (internal/modules/cjs/loader.js:693:27)
      at Module.require (internal/modules/cjs/loader.js:864:19)
      at require (internal/modules/cjs/helpers.js:74:18)
      at Object. (D:\forjobtest
      ode_modules\devtools\build\index.js:18:13)
      at Module._compile (internal/modules/cjs/loader.js:971:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1011:10)
      (node:1296) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
      (node:1296) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

    • @aldwintest3828
      @aldwintest3828 Před 4 lety

      i just found the solution it is in my node js version and nvm which I have not installed. so I used the recommended node js version after installing nvm

  • @renubala1889
    @renubala1889 Před 3 lety +1

    I run this command it comes this error.Please help me how to resolve this.
    ./node_modules/.bin/wdio

    • @gaborpilar2059
      @gaborpilar2059 Před 3 lety

      you have to add new bash terminal with + button and chang to them

  • @prasanthkrishnan9819
    @prasanthkrishnan9819 Před 2 lety

    Hey How to open the Webdriver IO after closing it

  • @aadhithyaananthanarayanan2446

    node_modules/.bin/wdio config I cannot make this work naveen

  • @joyceprarthana
    @joyceprarthana Před 4 lety

    I observed the below error when selecting chrome driver and selenium standalone server ..
    wdio-chromedriver-service cannot work together with @wdio/selenium-standalone-service @wdio/selenium-standalone-service already includes chromedriver Please uncheck one of them.
    Can you please help

    • @arvindsah3273
      @arvindsah3273 Před 4 lety

      Remove chrome driver service while setting up. It will work fine.

  • @vigneshsrinivasan4527
    @vigneshsrinivasan4527 Před 4 lety

    Unable to add both chromedriver and selenium standlone server in wdio configuration. Here is the error message:
    wdio-chromedriver-service cannot work together with @wdio/selenium-standalone-service @wdio/selenium-standalone-service already includes chromedriver

    • @gurumahadev5702
      @gurumahadev5702 Před 4 lety

      Hi Vignesh, i am also facing same issue. Kindly let me know how did u proceed.

    • @vigneshsrinivasan4527
      @vigneshsrinivasan4527 Před 4 lety

      @@gurumahadev5702 Hi Guru i dint fix this problem. instead i'm just using chromedriver alone for now.

  • @jaiprakasharora748
    @jaiprakasharora748 Před 4 lety

    I have run wdio config, it successfully installed, but it not showing in workspace. Please help

    • @sumonfk
      @sumonfk Před 3 lety

      I have same problem

  • @Ashokkumarg8
    @Ashokkumarg8 Před 4 lety

    Whether the following command needs to be appended with "--save-dev"
    npm install @wdio/cli. Why it is specifically added to the dependencies and not into dev dependencies

    • @avishekbehera
      @avishekbehera Před 4 lety +1

      Basically dev dependencies are meant to tell npm that these are only for development purpose , basically it should not be applicable when the application goes to production. This is mostly relatable for developers , for testing I do not think it matters , unless you push your test code to Production which gets consumed by others as client.

    • @Ashokkumarg8
      @Ashokkumarg8 Před 4 lety

      @@avishekbehera Then can we use the mentioned commands in the description without appending the --save-dev Since we use it for Automation purpose?

  • @muthufazer
    @muthufazer Před 4 lety

    Guys any one pls tell me whether node js will run in Internet explorer browser.
    i want to know how to configure ie driver in webdriverio can u please help me
    Can u put one video how to configure ie driver naveen pls reply

  • @kannansubramaniyan1021

    for edge driver is not working

  • @sayana123
    @sayana123 Před 4 lety

    Hi Naveen , when I install : npm install @wido/cli then I'm getting E404 Error not found the latest . Please advice me . Thanks

    • @rm9125
      @rm9125 Před 4 lety

      I guess that is because of typo in your command, it should be @wdio

  • @platinumpineapple9943
    @platinumpineapple9943 Před 3 lety

    Where tf is part 1