Giter Site home page Giter Site logo

hcchappy / edge-selenium-tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/edge-selenium-tools

0.0 2.0 0.0 116 KB

An updated EdgeDriver implementation for Selenium 3 with newly-added support for Microsoft Edge (Chromium).

Home Page: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/

License: Apache License 2.0

C# 62.27% Python 17.39% JavaScript 20.34%

edge-selenium-tools's Introduction

Selenium Tools for Microsoft Edge

Build Status

Selenium Tools for Microsoft Edge extends Selenium 3 with a unified driver to help you write automated tests for both the Microsoft Edge (EdgeHTML) and new Microsoft Edge (Chromium) browsers.

The libraries included in this project are fully compatible with Selenium's built-in Edge libraries, and run Microsoft Edge (EdgeHTML) by default so you can use our project as a seamless drop-in replacement. In addition to being compatible with your existing Selenium tests, Selenium Tools for Microsoft Edge gives you the ability to drive the new Microsoft Edge (Chromium) browser and unlock all of the latest functionality!

The classes in this package are based on the existing Edge and Chrome driver classes included in the Selenium project.

Before you Begin

The Selenium Tools for Microsoft Edge is a solution for developers who prefer to remain on Selenium 3 which is the current stable release and developers who have existing browser tests and want to add coverage for the new Microsoft Edge (Chromium) browser without changing the Selenium version.

The very same Edge driver classes provided in this package are included in Selenium 4 and are already available today in the latest Selenium 4 Alpha release. If you are able to upgrade to Selenium 4 Alpha, there is no need to use this package as Selenium should already have everything you need built in!

Getting Started

Downloading Driver Executables

You will need the correct WebDriver executable for the version of Microsoft Edge you want to drive. The executables are not included with this package. WebDriver executables for all supported versions of Microsoft Edge are available for download here. For more information, and instructions on downloading the correct driver for your browser, see the Microsoft Edge WebDriver documentation.

Installation

Selenium Tools for Microsoft Edge depends on the official Selenium 3 package to run. You will need to ensure that both Selenium 3 and the Tools and included in your project.

C#

Add the Microsoft.Edge.SeleniumTools and Selenium.WebDriver packages to your .NET project using the NuGet CLI or Visual Studio.

JavaScript

npm install @microsoft/edge-selenium-tools

Python

Use pip to install the msedge-selenium-tools and selenium packages:

pip install msedge-selenium-tools selenium==3.141

Example Code

See the Microsoft Edge WebDriver documentation for lots more information on using Microsoft Edge (Chromium) with WebDriver.

C#

using Microsoft.Edge.SeleniumTools;

// Launch Microsoft Edge (EdgeHTML)
var driver = new EdgeDriver();

// Launch Microsoft Edge (Chromium)
var options = new EdgeOptions();
options.UseChromium = true;
var driver = new EdgeDriver(options);

JavaScript

const edge = require("@microsoft/edge-selenium-tools");

// Launch Microsoft Edge (EdgeHTML)
let driver = edge.Driver.createSession();

// Launch Microsoft Edge (Chromium)
let options = new edge.Options().setEdgeChromium(true);
let driver = edge.Driver.createSession(options);

Python

from msedge.selenium_tools import Edge, EdgeOptions

# Launch Microsoft Edge (EdgeHTML)
driver = Edge()

# Launch Microsoft Edge (Chromium)
options = EdgeOptions()
options.use_chromium = True
driver = Edge(options = options)

Contributing

We are glad you are interested in automating the latest Microsoft Edge browser and improving the automation experience for the rest of the community!

Before you begin, please read & follow our Contributor's Guide. Consider also contributing your feature or bug fix directly to Selenium so that it will be included in future Selenium releases.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

edge-selenium-tools's People

Contributors

bwalderman avatar guangyuexu avatar microsoft-github-operations[bot] avatar microsoftopensource avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.