GithubHelp home page GithubHelp logo

pureyoda / playwright-elixir Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mechanical-orchard/playwright-elixir

0.0 0.0 0.0 33.67 MB

An Elixir library for Playwright web automation

License: MIT License

Shell 1.70% JavaScript 0.02% Elixir 98.28%

playwright-elixir's Introduction

Playwright for Elixir

NOTE: This package is currently in "preview". The features are not yet at parity with other Playwright implementations. Once playwright-elixir is at or near parity with playwright, the version number will be updated to mirror the supported version of playwright.

Overview

Playwright is an Elixir library to automate Chromium, Firefox and WebKit with a single API. Playwright is built to enable cross-browser web automation that is ever-green, capable, reliable and fast. See how Playwright is better.

Installation

The package can be installed by adding playwright to your list of dependencies in mix.exs:

def deps do
  [
    {:playwright, "~> 1.18.0-alpha.1"}
  ]
end

Usage

Example

defmodule Test.ExampleTest do
  use ExUnit.Case, async: true
  use PlaywrightTest.Case

  describe "Navigating to playwright.dev" do
    test "works", %{browser: browser} do
      page = Playwright.Browser.new_page(browser)

      Playwright.Page.goto(page, "https://playwright.dev")
      text = Playwright.Page.text_content(page, ".navbar__title")

      assert text == "Playwright"
      Playwright.Page.close(page)
    end
  end
end

Contributing

Getting started

  1. Clone the repo
  2. Run bin/dev/doctor and for each problem, either use the suggested remedies or fix it some other way
  3. Run bin/dev/test to run the test suite make sure everything is working

Day-to-day

  • Get latest code: bin/dev/update
  • Run tests: bin/dev/test
  • Start server: bin/dev/start
  • Run tests and push: bin/dev/shipit

Building assets for a release

mix assets.build

playwright-elixir's People

Contributors

coreyti avatar dbrody avatar eahanson avatar jasonwc avatar kianmeng avatar sax avatar woodward 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.