demo-selenium-typescript

Demo Selenium TypeScript

https://github.com/joelparkerhenderson/demo-selenium-typescript

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.2%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Demo Selenium TypeScript

Basic Info
  • Host: GitHub
  • Owner: joelparkerhenderson
  • Language: TypeScript
  • Default Branch: main
  • Size: 3.91 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created 10 months ago · Last pushed 10 months ago
Metadata Files
Readme Citation

README.md

Demo Selenium TypeScript

Demonstration of:

  • Selenium browser automation testing
  • JavaScript programming language
  • TypeScript for static typing and type annotations
  • Node runtime built on Chrome's V8 JavaScript engine
  • ChromeDriver extends Webdriver by adding Chromium-specific capabilities

Many more examples are here:

Install

Install Node and NPM

Install Node and NPM from https://nodejs.org/

Run this to confirm your version:

sh node -v

Output should be at least:

stdout v23.6.1

Run this to confirm your version:

sh npm -v

Output should be at least:

stdout 11.2.0

Install Selenium

Install Selenium WebDriver:

sh npm install --save selenium-webdriver@latest

Install chromedriver

Install Google chromedriver:

sh npm install --save chromedriver@latest

Update

Run:

sh npm install npm@latest npm upgrade npm audit fix

Install TypeScript

Run:

sh npm install typescript@latest npm install ts-node@latest npm install --save-dev @types/node npm install --save-dev @types/selenium-webdriver

Create a file tsconfig.json for TypeScript configuration:

sh npx tsc --init

Run

Run:

sh ./src/demo.ts

If you prefer, you can run with TypeScript Node explicitly:

sh ts-node src/demo.ts

The script will do three things:

  1. Launch your local Chrome web browser to view the free open source testing examples web page https://testingexamples.github.io.

  2. Interact with the web page in various ways, such as finding elements, clicking on elements, filling in form inputs, etc.

  3. Print some typical HTML tag output that demonstrates the program is running successfully.

Troubleshooting “chromedriver” Not Opened

If you get this kind of error message:

txt “chromedriver” Not Opened. Apple could not verify “chromedriver” is free of malware that may harm your Mac or compromise your privacy.

Or this kind of error message:

txt Apple is not able to verify that it is free from malware that could harm your Mac or compromise your privacy. Don’t open this unless you are certain it is from a trustworthy source.

Then click "Done".

Try this command line solution:

sh xattr -d com.apple.quarantine $(which chromedriver) 2>/dev/null

Try adjusting your system settings:

  • Apple menu -> Settings -> Security & Privacy -> General

  • See the entry that says: "chromedriver" was blocked to protect your Mac.

  • Click the button "Allow Anyway".

Troubleshooting "This version of ChromeDriver …"

If you get this kind of error message:

txt UnhandledPromiseRejectionWarning: SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version …

Then you may need to harmonize your Chrome browser app and your Chrome webdriver.

If you use macOS brew, then upgrade chromedriver:

sh brew upgrade chromedriver

To update your Chrome browser app:

  • On your computer, open Chrome.

  • Find your current Chrome version by typing in the URL bar: chrome://version/.

  • You should see a web page with many details, and you should see the first line with the version number, such as: "Google Chrome 135.0.7049.86 (Official Build)".

  • At top right, tap the "More" icon, which is 3 vertical dots.

  • You see the "More" menu. If you see a menu item "Update", then choose it. If you don't see a menu item "Update", then you're on the current version.

To update your Chrome webdriver:

  • Go to https://chromedriver.chromium.org/downloads

  • Download the version that matches your Chrome browser app.

Tracking

  • Package: demo-selenium-typescript
  • Version: 1.4.0
  • Created: 2019-11-02T00:00:00Z
  • Updated: 2025-04-24T13:58:02Z
  • License: GPL-2.0-or-greater or for custom license contact us
  • Contact: Joel Parker Henderson (joel@joelparkerhenderson.com)

Owner

  • Name: Joel Parker Henderson
  • Login: joelparkerhenderson
  • Kind: user
  • Location: California

Software developer. Technology consultant. Creator of GitAlias.com, NumCommand.com, SixArm.com, and many open source projects.

Citation (CITATION.cff)

cff-version: 1.2.0
title: Demo Selenium TypeScript
message: >-
  If you use this work and you want to cite it,
  then you can use the metadata from this file.
type: software
authors:
  - given-names: Joel Parker
    family-names: Henderson
    email: joel@joelparkerhenderson.com
    affiliation: joelparkerhenderson.com
    orcid: 'https://orcid.org/0009-0000-4681-282X'
identifiers:
  - type: url
    value: 'https://github.com/joelparkerhenderson/demo-selenium-typescript/'
    description: Demo Selenium TypeScript
repository-code: 'https://github.com/joelparkerhenderson/demo-selenium-typescript/'
abstract: >-
  Demo Selenium TypeScript
license: See license file

GitHub Events

Total
  • Push event: 3
  • Create event: 2
Last Year
  • Push event: 3
  • Create event: 2

Dependencies

package.json npm
  • @types/node ^22.14.1 development
  • @types/selenium-webdriver ^4.1.28 development
  • chromedriver ^135.0.2
  • npm ^11.3.0
  • selenium-webdriver ^4.31.0
  • ts-node ^10.9.2
  • typescript ^5.8.3