Selenium IDE with Command Line Runner

Поделиться
HTML-код
  • Опубликовано: 29 окт 2024

Комментарии • 85

  • @secrethymns1022
    @secrethymns1022 Год назад +1

    Your content is KING! I found you on Udemy first, then on youtube. I am learning so much, it's like being in a candy shop for real.

    • @RaghavPal
      @RaghavPal  Год назад

      Awesome, thank you Sekou

  • @mateapolic9067
    @mateapolic9067 11 месяцев назад

    Hello, great tutorial. I have some questions if you can help me with.. I don't understand if I must install side runner and driver every time I open the command prompt or not? Also I don't know how to write the path? My file is on the desktop and I wrote : cd Desktop\folder_name but it shows an error. Thank you very much.

    • @RaghavPal
      @RaghavPal  11 месяцев назад

      Matea
      No, you do not need to install the Selenium IDE Runner and driver every time you open the command prompt. Once you have installed them, they will be available to you regardless of whether or not you have closed and reopened the command prompt.
      To write the path to your file, you need to use the correct slashes. On Windows, you would use backslashes (\), while on macOS or Linux, you would use forward slashes (/). So, if your file is on your desktop in a folder called "folder_name", you would write the following path:
      ```
      cd C:\Users\\Desktop\folder_name
      ```
      Make sure to replace `` with your actual username.
      Here is an example of how to run the Selenium IDE Runner from the command prompt:
      ```
      npm install -g selenium-side-runner
      selenium-side-runner --file "C:\Users\\Desktop\folder_name\test.side"
      ```
      This will run the test file `test.side` from the folder `folder_name` on your desktop.

  • @TMNmediaTrading
    @TMNmediaTrading 2 года назад +1

    when i tried running same process even after a successful chromedriver installation remark was that- The ChromeDriver could not be found on the current PATH. Please download the latest version of the ChromeDriver from and ensure it can be found on your PATH. pls sir, how do i correct this

    • @RaghavPal
      @RaghavPal  2 года назад

      Hi, this will help sqa.stackexchange.com/questions/47730/the-chromedriver-could-not-be-found-on-the-current-path

  • @youshaarif4253
    @youshaarif4253 2 года назад +1

    +1 for being to the point, impeccable content!! thanks man XD

  • @carloscarrillo8934
    @carloscarrillo8934 4 года назад

    Great video bro ... Can I ask what's your Linux version? npm install -g chromedriver is not working for me on my EC2 ubuntu 18.04

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Carlos, I did this demo on Mac os

    • @adiluy1848
      @adiluy1848 4 года назад

      @@RaghavPal hi ..while I'm running (npm install -g selenium-side-runner) got some err it shows [npm err ! Unexpected end of JSON input while parsing near ........] Can you tell me why

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Adil, this may hlep - stackoverflow.com/questions/47675478/npm-install-errorunexpected-end-of-json-input-while-parsing-near-nt-webpack

  • @vijyantvibhu
    @vijyantvibhu Год назад

    Can you pls tell the commands to get the time to load page from selenium IDE?

    • @RaghavPal
      @RaghavPal  Год назад

      Hi Vijaynt,
      You can use the built-in getEval command in Selenium IDE to calculate the time it takes for a page to load.
      eg.
      command: store | (new Date()).getTime() | startTime
      target:
      value:
      command: open |
      target:
      value:
      command: storeEval | (new Date()).getTime() - startTime | loadTime
      target:
      value:
      command: echo | Page load time: ${loadTime}ms
      target:
      value:
      This script stores the current time in a variable startTime, opens the URL of the page to be tested, calculates the difference between the current time and the time stored in startTime, and stores the result in loadTime. Finally, it echoes the value of loadTime in the log, which represents the time it took for the page to load.

  • @martakozlowska3235
    @martakozlowska3235 2 года назад

    hey! everythings ok, but I have one problem. When I run the test via CMD the test starts, and I can see the progress whether the test passes or fails. On the other hand, a browser window launches, but I have no preview of the steps the test takes. Do you have any idea how to solve this?

    • @RaghavPal
      @RaghavPal  2 года назад

      Hi Marta, do you mean cmd vs gui progress, I believe the functionality is in-built and not sure if we can change that

  • @mishkakamtikar5564
    @mishkakamtikar5564 10 месяцев назад

    When i run my test suite from CI it fails, but from IDE it doesn't inam unsure why ? It throws issue like elements in span not found

    • @RaghavPal
      @RaghavPal  10 месяцев назад

      Mishka
      Here are common causes and troubleshooting steps:
      1. Environment Differences:
      Browser Versions: Ensure the CI environment uses the same browser version as your IDE.
      Browser Settings: Verify similar browser configurations (e.g., extensions, privacy settings).
      Network Conditions: Check for network restrictions or firewalls in the CI environment.
      Operating Systems: Address potential OS-specific differences in element rendering or behavior.
      2. Timing Issues:
      Implicit Waits: Adjust implicit wait times in your tests to accommodate slower page loads in the CI environment.
      Explicit Waits: Implement explicit waits for specific elements to ensure their presence before interacting with them.
      3. Element Locator Issues:
      Dynamic Elements: Use reliable locators that aren't affected by dynamic content changes. Avoid fragile locators like XPath expressions that rely on element positions.
      Unique Locators: Employ unique attributes (IDs, classes) or combinations of attributes for robust identification.
      Wait for Elements: Verify elements are fully loaded and visible before interacting with them.
      4. CI Configuration:
      Browser Setup: Double-check browser setup and configuration in your CI pipeline.
      Dependencies: Ensure all required Selenium dependencies and drivers are correctly installed in the CI environment.
      Logging: Enable detailed logging to capture error messages and pinpoint failures.
      5. IDE-Specific Features:
      Avoid Reliance: Refrain from using IDE-specific features that might not work in CI.
      Additional Tips:
      Inspect Differences: Use developer tools to compare page structure and element availability in both environments.
      Isolate Tests: Run individual tests in CI to pinpoint problematic ones.
      Debugging: Use screenshots or videos to visualize test execution in CI.
      Headless Browsers: Test with headless browsers in your IDE to simulate CI conditions.

  • @pradeepedirisinghe8215
    @pradeepedirisinghe8215 4 года назад

    When I select the test case, I'm not seen the three dots to find the export drop downs. Do I need to install any plugin to see rename, duplicate. delete and Export drop downs?

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Pradeep, no need of any plugin. Not sure if something has changed in the latest ver. You can also check documentation online

  • @raccoonpolicedepartm
    @raccoonpolicedepartm 2 года назад

    Hi there. Thanks for the cool tutorial, but can it be run with correct order? I have 2 simple tests \ test Suites. Login to the System + Manager Dashboard page tests, but for some reason the Manager Dashboard test always runs before Login. Tried to change the sequence - nothing helped. What am I doing wrong?
    RUNS ./2.StageManagerPages.test.js
    RUNS 1.StageManagerLogin/1.ManagerLogin.test.js
    Test Suites: 0 of 2 total
    RUNS ./2.StageManagerPages.test.js
    FAIL ./2.StageManagerPages.test.js (5.345s)t.js
    ● 2. Stage Manager Pages › 2. Manager Dashboard
    Test Suites: 1 failed, 1 passed, 2 total
    Tests: 1 failed, 1 passed, 2 total

    • @RaghavPal
      @RaghavPal  2 года назад

      Hi Albert, I am not sure on this, will need to check

  • @halilkarakus4364
    @halilkarakus4364 5 лет назад +1

    Great video. Thanks.
    "Output test results to a file.
    "
    selenium-side-runner --output-directory=results
    selenium-side-runner --output-directory=results --output-format=junit
    Could you shoot a video about this episode?

    • @RaghavPal
      @RaghavPal  5 лет назад +1

      I will check on this Halil

    • @halilkarakus4364
      @halilkarakus4364 5 лет назад +1

      OK, I've solved the problem.
      Usage; selenium-side-runner "path\project.side" --outputdirectory "...
      esults\project.xml" output-format junit
      I solved it that way. Thanks.
      @@RaghavPal

    • @ledinhdong
      @ledinhdong Год назад

      error: unknown option '--outputdirectory'
      (Did you mean --output-directory?)
      thanks you

  • @tanmoyroy8948
    @tanmoyroy8948 5 лет назад

    Great video Raghav...Can you please make tutorials playlist on UFT as well? let me know your thoughts on that.

    • @RaghavPal
      @RaghavPal  5 лет назад +1

      Hi Tanmoy, I will check on UFT but can take some time.

    • @onlytanmoy
      @onlytanmoy 5 лет назад +1

      @@RaghavPal fine by me, Raghav...no rush...thanks for considering my request 👍

  • @shinekumarkp4696
    @shinekumarkp4696 3 года назад

    Hi. Thank you for the tutorial. Please help me regarding this. I followed your steps to configure Selenium CLI in an Amazon EC2 instance.
    But when running the command selenium-side-runner /path/to/your-project.side I am receiving the following error.
    info: Running Mynew.side
    FAIL ./MySuiteOne.test.js
    ● Test suite failed to run
    WebDriverError: unknown error: Chrome failed to start: exited abnormally.
    (unknown error: DevToolsActivePort file doesn't exist)
    (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
    at Object.throwDecodedError (../../usr/local/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/error.js:550:15)
    at parseHttpResponse (../../usr/local/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/http.js:560:13)
    at Executor.execute (../../usr/local/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/http.js:486:26)
    Test Suites: 1 failed, 1 total
    Also when installing chrome drive using the command specified in the official document, I faced the following error
    Copying to target path /usr/local/lib/node_modules/chromedriver/lib/chromedriver
    ChromeDriver installation failed { Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/chromedriver/lib/chromedriver'
    at Object.mkdirSync (fs.js:757:3)
    at copyIntoPlace (/usr/local/lib/node_modules/chromedriver/install.js:301:6)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    errno: -13,
    syscall: 'mkdir',
    code: 'EACCES',
    path: '/usr/local/lib/node_modules/chromedriver/lib/chromedriver' }
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! chromedriver@90.0.1 install: `node install.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the chromedriver@90.0.1 install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    But I managed to install it via command *npm -g install chromedriver --unsafe-perm=true --allow-root* and it was succeeded. Please let me know the solution to install and configure selenium in remove linux server without GUI

    • @RaghavPal
      @RaghavPal  3 года назад

      Sure, so the issue was as it was not finding chromedriver. I will plan a session

  • @prafulanand6548
    @prafulanand6548 5 лет назад +1

    Nice one .

  • @anuragbond913
    @anuragbond913 Год назад

    Hi Sir, I want to upload a document to my webite and record that in Salenium IDE, how to record the upload document process. It is showing error again and again. Please help me out.

    • @RaghavPal
      @RaghavPal  Год назад

      Hi Anurag, In Selenium IDE, you can use the "type" command to simulate a file upload, e.g.
      First, locate the file input element on the page using the "locator" command. For example, if the file input element has an "id" attribute of "fileUpload", you would use the following command:
      locator | id=fileUpload
      Next, use the "type" command to enter the path of the file you want to upload. You should use the full path of the file, including the file name and extension, e.g.
      type | id=fileUpload | C:\mydoc.pdf
      Finally, use the "click" command to submit the form containing the file input element. For example, if the form has an "id" attribute of "fileForm", you would use the following command:
      click | id=fileForm |

    • @anuragbond913
      @anuragbond913 Год назад

      Hi @@RaghavPal , Thanks for replying. But i can not find 'locator' command in my Selenium IDE commands pop-ups as well as when i manually type 'locator' command it gives error: Unknown command locator.

    • @RaghavPal
      @RaghavPal  Год назад

      you can simply type the strategy and the locator value separated by "=" sign in the Target field of the command. For example, to click on a button with ID "myButton", you would use the command "click" and set the Target to "id=myButton".

  • @aniruddhavaidya4536
    @aniruddhavaidya4536 10 месяцев назад

    Can we run a test in loop for performance testing?

    • @RaghavPal
      @RaghavPal  10 месяцев назад

      Aniruddha, you mean to use Se IDE for performance testing. May not be scalable.

  • @avkumar9917
    @avkumar9917 5 лет назад

    Hi Raghav
    I tried following the same steps as you have shown but unable to execute the test on Command prompt. I am using Windows OS.
    Below are the steps which I followed:
    npm install -g selenium-side-runner
    npm install -g chromedriver
    Both these above steps got executed successfully without any errors. Post that i executed
    selenium-side-runner /C:Users/av/Downloads/MyProject.side
    The above command does not execute the test nor did it open the chrome browser for execution. Also did not throw any error.
    Also tried with:
    selenium-side-runner -c "browserName=chrome" /C:Users/av/Downloads/MyProject.side
    Please help. What may be the possible reasons for this?

    • @RaghavPal
      @RaghavPal  5 лет назад

      Hi AV, the command format is
      selenium-side-runner "path\project.side" --outputdirectory "...
      esults\project.xml" output-format junit
      Also check github.com/SeleniumHQ/selenium-ide/issues/289

  • @pb6096
    @pb6096 5 лет назад

    Hi Raghav , could you please help me with ,how to change dynamic field in record and play test case (IDE or Katalon) for example ,if I record a tc creating test enquiry ,which creates an enquiry number and verify enquiry based on the created enquiry ,so when I run the next time how can I verify the created enquiry with the enquiry number ,because the new test case creates new enquiry.
    Could you please help me with this.
    Thanks 🙏🏿

    • @RaghavPal
      @RaghavPal  5 лет назад

      Hi P B, I will need to check on this myself. There are commands like store text and asert text. Pls try them

  • @victoralfonsoramos3734
    @victoralfonsoramos3734 5 лет назад

    Hi Raghav, nice video. I try run selenium script in browser the citrix, is posible ?

    • @RaghavPal
      @RaghavPal  5 лет назад +1

      Hi Victor, I have not tried on Citrix, Will have to check. You can do a hands-on and see

    • @victoralfonsoramos3734
      @victoralfonsoramos3734 5 лет назад

      @@RaghavPal I already run the script but it Open its browser instance and does not take the browser Open in citrix ...some advice to take an open chrome Windows current

    • @RaghavPal
      @RaghavPal  5 лет назад

      Okay, no clue on this Victor, will have to check online or if you goto the extension page you can put your query there

  • @mymonthlygift
    @mymonthlygift 4 года назад +1

    Hi! If you have multiple test suites in one project, is there way to run them in a specific sequence in command line?

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi, not sure on this, will have to check documentation

    • @mymonthlygift
      @mymonthlygift 4 года назад

      @@RaghavPal hello! Were you able to find any documentation? :)

    • @RaghavPal
      @RaghavPal  4 года назад

      I mean, you can search here - www.selenium.dev/selenium-ide/docs/en/introduction/getting-started

    • @meaenggqa2200
      @meaenggqa2200 3 года назад

      I have a similar issue - I exported a Script from Selenium IDE to a .py file, but need to run some other repository files (with xpaths assigned into variables) before the script can be run-can you help?

  • @jean-mariemarkowski5195
    @jean-mariemarkowski5195 4 года назад +1

    Hi,
    It's very good demo but can you tell how to use Selenium_Ide scenario in JENKINS ?
    It's impossible for me :)

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Jean, what is your use-case, We use Jenkins for CI CD and we basically need a command to run our test from command line and can use the same in Jenkins

    • @manoharanramanathan
      @manoharanramanathan 4 года назад +1

      @@RaghavPal Hi can you give me a demo to selenium IDE + JENKINS Integration for a web application like login page

  • @bhharathisekar9851
    @bhharathisekar9851 4 года назад

    Hi sir, can we integrate or validate the string value of different application by using this ?

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Bhharathi, you mean string value of some object text, You should be able to do this

    • @bhharathisekar9851
      @bhharathisekar9851 4 года назад

      @@RaghavPal iam having 2 application, we have migrated the values from old to new now i need to compare the values whether it is migrated correctly or not from old app to new

    • @bhharathisekar9851
      @bhharathisekar9851 4 года назад

      Can you please help

    • @RaghavPal
      @RaghavPal  4 года назад

      Okay, I believe you can then check for some migration tool or create custom script for this

  • @sonamsahu5889
    @sonamsahu5889 4 года назад

    Hi @Raghav,
    I have watched the above video and followed each step.
    But I am facing this error -
    C:\Users\Sonam>selenium-side-runner /Users/Sonam/Downloads/SmoketestOnQA1.side
    info: Running C:/Users/Sonam/Downloads/SmoketestOnQA1.side
    FAIL BBv2SmokeSuit/9.AffiliateDetails-RankView.test.js
    ● Test suite failed to run
    The ChromeDriver could not be found on the current PATH. Please download the latest version of the ChromeDriver from chromedriver.storage.googleapis.com/index.html and ensure it can be found on your PATH.
    at new ServiceBuilder (../AppData/Roaming/npm/node_modules/selenium-side-runner/node_modules/selenium-webdriver/chrome.js:232:13)
    at getDefaultService (../AppData/Roaming/npm/node_modules/selenium-side-runner/node_modules/selenium-webdriver/chrome.js:321:22)
    at Function.createSession (../AppData/Roaming/npm/node_modules/selenium-side-runner/node_modules/selenium-webdriver/chrome.js:694:44)
    at createDriver (../AppData/Roaming/npm/node_modules/selenium-side-runner/node_modules/selenium-webdriver/index.js:155:33)
    at Builder.build (../AppData/Roaming/npm/node_modules/selenium-side-runner/node_modules/selenium-webdriver/index.js:662:16)
    at buildDriver (../AppData/Roaming/npm/node_modules/selenium-side-runner/node_modules/jest-environment-selenium/dist/index.js:66:17)
    at WebdriverEnvironment.setup (../AppData/Roaming/npm/node_modules/selenium-side-runner/node_modules/jest-environment-selenium/dist/index.js:37:32)
    Can you please help me to short out.
    Even I have installed Chrome Driver.

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Sonam, try to place the chromedriver exe in the same location where you have your script and running commands from

    • @sonamsahu5889
      @sonamsahu5889 4 года назад

      Thanks, @Raghav for helping me.
      But after the following steps still I have faced the same error. Then I have set the chrome driver path in the environment variable. Now facing this error I have tried a lot but not able to fix it.
      If possible can you please help me with this?
      C:\Users\Sonam>selenium-side-runner \Users\Sonam\Downloads\SmoketestOnQA1.side
      info: Running C:/Users/Sonam/Downloads/SmoketestOnQA1.side
      FAIL BBv2SmokeSuit/9.AffiliateDetails-RankView.test.js
      ● Test suite failed to run
      WebDriverError: unknown error: chrome failed to start
      (Driver info: chromedriver=2.0,platform=Windows NT 6.2 x86_64)
      at Object.checkLegacyResponse (../AppData/Roaming/npm/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/error.js:585:15)
      at parseHttpResponse (../AppData/Roaming/npm/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/http.js:551:13)
      at Executor.execute (../AppData/Roaming/npm/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/http.js:486:26)

  • @aashisoni6018
    @aashisoni6018 2 года назад

    can we test mobile app using this extension ?

    • @RaghavPal
      @RaghavPal  2 года назад

      Hi Aashi, Short answer will be No

  • @judithelemo
    @judithelemo 3 года назад

    I have followed the step but see the below error when i run from the command line
    internal/fs/utils.js:220
    throw err;
    ^
    Error: EISDIR: illegal operation on a directory

    • @RaghavPal
      @RaghavPal  3 года назад

      Hi Judith, this can help github.com/SeleniumHQ/selenium-ide/issues/303

  • @bharaticrathod
    @bharaticrathod 2 года назад

    Sir please help me how record localhost file using selenium ide

    • @RaghavPal
      @RaghavPal  2 года назад +1

      Hi Bharatic, i will check on it

  • @paulwoode5100
    @paulwoode5100 3 года назад

    Rahhav how to run this on a jenkins slave node ?

    • @RaghavPal
      @RaghavPal  3 года назад

      Hi Paul, I have not yet tried, basically if you have a command to run from command line, you can run it from Jenkins

  • @norielbernardo
    @norielbernardo Год назад

    Are you able to leave the window open and NOT call Close?

    • @RaghavPal
      @RaghavPal  Год назад

      not sure, will need to check again

  • @sairapolu3814
    @sairapolu3814 2 года назад

    Can you please tell me how to upload csv file path in selenium ide

    • @RaghavPal
      @RaghavPal  Год назад +1

      this can help ui.vision/rpa/docs/selenium-ide/form-filling

  • @salimtheone
    @salimtheone 2 года назад

    thx brother.

    • @RaghavPal
      @RaghavPal  2 года назад

      You're welcome Salim

  • @wasayyed70
    @wasayyed70 Год назад

    How to slow the execution in command line runner?

    • @RaghavPal
      @RaghavPal  Год назад +1

      In Selenium IDE, you can slow down the execution of your test cases using the "pause" command. When you run your test cases using the command line runner, you can specify the amount of time you want to pause using the --delay option.
      Here's an example of how you can slow down the execution by adding a pause of 5 seconds after each command:
      $ selenium-side-runner --delay 5000 my_test_case.side
      In this example, --delay 5000 specifies a delay of 5000 milliseconds (or 5 seconds) after each command. You can adjust the delay time to fit your specific needs.
      Alternatively, you can add the pause command directly in your test case in Selenium IDE. To do this, simply add a new command and select "pause" from the command dropdown menu. You can then specify the amount of time you want to pause in milliseconds in the "Target" field.
      I hope that helps!

    • @wasayyed70
      @wasayyed70 Год назад

      @@RaghavPal thanks a lot for the reply

  • @saathvikam
    @saathvikam 5 лет назад

    Hi sir.. I want to qualify for ISTQB exam. Could you please help me how to come over it from preparation to pursuing the certificate.
    Please

    • @RaghavPal
      @RaghavPal  5 лет назад

      Hi Saathvika, you can refer Rex Black book. There will be online pdf available. Will be enough for ISTQB

  • @norm1674
    @norm1674 5 лет назад +1

    testing