Attributes
Includes Deno configuration
Repository
Current version released
4 months ago
Dependencies
deno.land/x
skypack.dev
@types/lodashlodash-es
A easy way to implement and write Selenium with TypeScript using Deno π¦
Still working on managing custom function test using selenium webdriver builder βΉοΈ
But for now we have already implemented test using object type like you can see in the usage section π
Features
- Easy handling on driver side web browser to isolate each test β .
- Get a daily log file to check all test process if passed or failed β .
- Possibility to export test case as Log β .
Configuration
You need to create a drowser.json in root directory and define some configuration like this:
url
: The url of platform or website you want to testexportPdf
: Set totrue
if you want to export your test reports inside a pdf file
{
"url": "http://url_of_the_platform_need_to_be_tested",
"exportPdf": false
}
Usage
In your test file , you can define a sample test like this:
import { driver } from "https://deno.land/x/drowser@v0.1.1/mod.ts";
driver({ browser: "chrome" })
.then(({ service }) => {
service.cases = [
async ({ builder, assert }) => {
service.case_name = "Verify Title";
const title = await builder.getTitle();
assert.assertEquals(title, "Drowser");
},
];
})
.catch((error) => console.log(error));
driver({ browser: "firefox" })
.then(({ service }) => {
service.cases = [
async ({ builder, assert }) => {
service.case_name = "Verify Title";
const title = await builder.getTitle();
assert.assertEquals(title, "Drowser");
},
];
})
.catch((error) => console.log(error));
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.