Skip to content

clear-code/lua-web-driver

Repository files navigation

LuaWebDriver

https://lua-web-driver.gitlab.io/lua-web-driver/

This is a browser automation library using WebDriver API. Currently, this library supports geckodriver only.

Installation

Use LuaRocks.

$ luarocks install web-driver

Usage

local web_driver = require("web-driver")

local firefox = web_driver.Firefox.new()

function callback(session)
  session:visit("http://example.com")
  local elements = session:css("a")
  element[0]:click()
  print(session:source())
end

firefox:start()
firefox:start_session(callback)
firefox:stop()

License

MIT License. See LICENSE file.