Skip to main content
Version: 1.0.0

Browser Extension Operations (v1.0.0)

Prerequisites

  1. Golang
  2. Docker
  3. GCC compiler
  4. Selenium IDE extension
  5. Keploy

Install Keploy on PC

git clone https://github.com/keploy/keploy.git

Now come inside this directory and run this project in docker by putting the command mentioned below.

docker-compose -f docker-compose-dev.yaml up

Install the Keploy browser extension from the link: https://github.com/keploy/browser-extension/releases

After installing the browser extension go inside your extension manager and switch to the developer mode.

Extension Manager

After that go on the load unpacked button, which appears just after switching on the developer mode and import your extension file from the expected location.

Unpack

Now we have:

  • Selenium extension installed

  • Keploy extension installed

  • Keploy tool is installed and running in docker

Let's start front-end testing using selenium IDE extension. The Keploy extension will keep running in the background once keploy server is up.

Step-1: Create a new project and rename it, or you can also open an existing project

Create Project

Project name

Step-2: Give a title to your 1st test case

Test case Rename test case Test case name

Step-3: Put the URL of the desired website for testing.

Endpoint of the project

Step-4: Press on the record button present in the top right corner.

Record

Step-5: Now default browser will open, In our case, it’s the chrome browser.

Step-6: Perform your desired actions and selenium will start recording the positions and actions along with the data present at that place.

Step-7: In our case we are doing a google search with the keyword oss. We can see many search results present in the suggestion but we will go with the 1 st option.

Perform Actions Record Actions

Step-8: We know that our keploy server is already running in the background and keploy extension is present in the chrome browser. In the background, our keploy server is recording all the data coming from APIs on the front end in mongo DB. Let’s see inside mongo DB using mongo compass.

Compass Screenshot

Step-9: Now we will replay the recorded data in selenium, but this time data will not come from live servers of google, instead of that data will come from the moc database made by keploy

Re-Run with Keploy Test Run

Step-10: Now because of the static database all the selenium test cases will pass.

Dependency Mocking