Socket
Socket
Sign inDemoInstall

@types/selenium-webdriver

Package Overview
Dependencies
0
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/selenium-webdriver

TypeScript definitions for Selenium WebDriverJS


Version published
Weekly downloads
1.3M
increased by7.42%
Maintainers
1
Install size
205 kB
Created
Weekly downloads
 

Package description

What is @types/selenium-webdriver?

The @types/selenium-webdriver package provides TypeScript type definitions for the selenium-webdriver package, which is a browser automation framework. These type definitions allow developers to use Selenium with TypeScript by providing the necessary type annotations for better development experience, such as code completion and type checking.

What are @types/selenium-webdriver's main functionalities?

Browser Control

This feature allows you to control a browser programmatically, including opening pages, filling out forms, and simulating user actions.

import { Builder, By, Key, until } from 'selenium-webdriver';

(async function example() {
  let driver = await new Builder().forBrowser('firefox').build();
  try {
    await driver.get('http://www.google.com/ncr');
    await driver.findElement(By.name('q')).sendKeys('webdriver', Key.RETURN);
    await driver.wait(until.titleIs('webdriver - Google Search'), 1000);
  } finally {
    await driver.quit();
  }
})();

Element Interaction

This feature allows interaction with HTML elements on a web page, such as clicking buttons, entering text, and reading element attributes.

import { Builder, By } from 'selenium-webdriver';

(async function example() {
  let driver = await new Builder().forBrowser('firefox').build();
  try {
    await driver.get('http://www.example.com');
    let element = await driver.findElement(By.id('some-id'));
    await element.click();
  } finally {
    await driver.quit();
  }
})();

Wait Conditions

This feature provides the ability to wait for certain conditions to be met before proceeding with further actions, such as waiting for an element to be present or visible.

import { Builder, By, until } from 'selenium-webdriver';

(async function example() {
  let driver = await new Builder().forBrowser('firefox').build();
  try {
    await driver.get('http://www.example.com');
    await driver.wait(until.elementLocated(By.id('some-id')), 10000);
  } finally {
    await driver.quit();
  }
})();

Other packages similar to @types/selenium-webdriver

Readme

Source

Installation

npm install --save @types/selenium-webdriver

Summary

This package contains type definitions for Selenium WebDriverJS (https://github.com/SeleniumHQ/selenium).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/selenium-webdriver.

Additional Details

  • Last updated: Wed, 02 Feb 2022 14:31:24 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Bill Armstrong, Yuki Kokubun, Craig Nishina, Simon Gellis, Ben Dixon, Ziyu, Johann Wolf, Aleksey Chemakin, David Burns, and Pirasis Leelatanon.

FAQs

Last updated on 02 Feb 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc