Skip to main content

Drowser

deno module deno compatibility license

A easy way to implement and write Selenium with TypeScript using Deno πŸ¦•

Features

  • Easy handling on driver side web browser to isolate each test βœ…
  • Possibility to export test case as PDF πŸ› οΈ
  • Possibility to export test case as Log πŸ› οΈ
  • Usage of AI for analyse the percentage of success and failed test πŸ› οΈ

Configuration

You need to create a drowser.json in root directory and define some configuration like this:

{
  "url": "http://url_of_the_platform_need_to_tested"
}

Installation

You can define it inside your import_map.json config, like this:

{
  "imports": {
    "drowser": "https://deno.land/x/drowser/lib.ts"
  }
}

And call it inside deps.ts very easy, like this:

import { assert, driver } from "drowser"
export { assert, driver }

Usage

In you test file , you can define a sample test like this:

import { assert , driver } from "./deps.ts"
import type { TDrowserBuilder } from "drowser"

const testTitle = (builder: TDrowserBuilder) => {
  builder.getTitle().then((t) => {
        try {
            const tVal = "Todo App"
            assert.assertEquals(t, tVal)
        } catch (err) {
            console.log(err)
        }
    })
}

driver({ browserType: "chrome" }).then(({ builder }) => {
    testTitle(builder)
    builder.quit()
}).catch((err) => {
    console.log(err)
})

With this test we only test this sample code inside a Chrome Webdriver but you can create a test for another web browser like Firefox, Edge, Safari πŸš€

LICENSE

MIT.