Skip to content

Update to latest versions #4

@marie-dk

Description

@marie-dk

Thank you for providing this great example.

Everything works like a charm, after I updated everything to the latest version, and then did the follow changes:

Downgraded chai
... to 4.2.0 because of the change the require of chai to a dynamic import() which is available in all CommonJS modules -error

lib/browser.ts line 89:

-- options.headless();
++ options.addArguments('-headless');

This is my current package.json:

{
  "name": "selenium-typescript-example",
  "version": "1.0.0",
  "description": "Selenium WebDriver Typescript using Page Object Models",
  "main": "index.js",
  "scripts": {
    "prebuild": "rimraf dist",
    "build": "npx tsc",
    "pretest": "npm run build",
    "test": "mocha",
    "pretest:chrome": "npm run build",
    "test:chrome": "cross-env BROWSER_ENV=true BROWSER_NAME=chrome mocha",
    "pretest:firefox": "npm run build",
    "test:firefox": "cross-env BROWSER_ENV=true BROWSER_NAME=firefox mocha"
  },
  "keywords": [
    "selenium",
    "node",
    "typescript"
  ],
  "author": "Imran Wijaya",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/imranwijaya/selenium-typescript-example.git"
  },
  "license": "ISC",
  "devDependencies": {
    "@types/chai": "^5.0.0",
    "@types/mocha": "^10.0.8",
    "@types/mochawesome": "^6.2.4",
    "@types/node": "^22.7.4",
    "@types/selenium-webdriver": "^4.1.26",
    "@typescript-eslint/eslint-plugin": "^8.8.0",
    "@typescript-eslint/parser": "^8.8.0",
    "chai": "^4.2.0",
    "cross-env": "^7.0.3",
    "eslint": "^9.11.1",
    "eslint-config-prettier": "^9.1.0",
    "eslint-plugin-prettier": "^5.2.1",
    "mocha": "^10.7.3",
    "mochawesome": "^7.1.3",
    "prettier": "3.3.3",
    "reflect-metadata": "^0.2.2",
    "rimraf": "^6.0.1",
    "selenium-webdriver": "^4.25.0",
    "typescript": "^5.6.2"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions