GithubHelp home page GithubHelp logo

tporeba / jserrorcollector Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mguillem/jserrorcollector

0.0 1.0 0.0 2.28 MB

Collects JS errors and make them available from WebDriver

Shell 21.59% Java 52.79% JavaScript 21.44% HTML 4.17%

jserrorcollector's Introduction

JSErrorCollector

This project allows to capture JavaScript errors while running tests with WebDriver (currently only in Java). Ideally this feature should be built-in WebDriver but it is not (yet?) the case (see WebDriver issue [API for checking for JavaScript errors on the page] 1 for details). Other information concerning JavaScript error capturing with WebDriver is available in this [blog post] 3.

Features

  • provide access to JavaScript errors while running tests with a FirefoxDriver (in Java)

Usage in Java

FirefoxProfile ffProfile = new FirefoxProfile();
JavaScriptError.addExtension(ffProfile);
final WebDriver driver = new FirefoxDriver(ffProfile);

driver.get("http://somesite");
		
final List<JavaScriptError> jsErrors = JavaScriptError.readErrors(driver);
assertTrue("JS errors occured: " + jsErrors, jsErrors.isEmpty());

Download

Pre-built jar file is available in [dist folder] 2.

For non Java users

The Firefox extension (the [.xpi file] 5) can be used from any language having a WebDriver binding. Here are a few examples:

  • [in Ruby from Cucumber + Capybara] 4.
  • [in Ruby with Watir] 8.

A .NET port is available: [JSErrorCollector.NET by protectedtrust] 7.

License

JSErrorCollector is licensed under the terms of the [Apache License 2] 6.

jserrorcollector's People

Contributors

gregory144 avatar lcmtwn avatar mguillem avatar tporeba avatar

Watchers

 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.