fs2-selenium

License Build Status codecov Maven Central

A purely functional library for Selenium

Setup

Download the dependency from Maven Central

SBT

libraryDependencies += "com.github.pierrenodet" % "fs2-selenium_2.12" % "0.0.1"

Maven

<dependency>
  <groupId>com.github.pierrenodet</groupId>
  <artifactId>fs2-selenium_2.12</artifactId>
  <version>0.0.1</version>
</dependency>

How to use

App example to go on google.com and get the url

import cats.effect._
import org.openqa.selenium.chrome.ChromeOptions
import com.github.pierrenodet.fs2.selenium._

object Main extends IOApp {

  val chromeOptions = new ChromeOptions()

  def run(args: List[String]): IO[ExitCode] =
    for {
      _ <- Driver[IO](chromeOptions)
      .use(
        d => {
          for {
            _ <- d.get("https://www.google.com").value
            lol <- d.currentUrl
          } yield lol
        }
      )
    } yield ExitCode.Success

}

Contributing

Feel free to open an issue or make a pull request to contribute to the repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the Apache License Version 2.0 - see the LICENSE file for details