Browza

Description

Very simple, yet reliable, Selenium-Webdriver3, command module. Simple set of commands to automate your browser without having to code.

Browza also supports and easily integrates with Ruby Gem appmodel which supports modeling (e.g. simplify pageObjects).

Installation

gem install browza

APIs

click()

Browser Creation

  1. createBrowser
  2. createBrowser(:chrome)
  3. createBrowser(:firefox)
  4. start()
    • Run locally
    • SELENIUM_RUN=local
    • SELENIUM_PLATFORM=local
    • SELENIUM_BROWSER=[ chrome | firefox | ie | edge ]
    • SELENIUM_RESOLUTION=[widthxheight]
      • 1024x768
    • Run on SauceLabs
    • SELENIUM_PLATFORM=[ Windows 8.1 | Windows 10 | linux | osx* ]
    • SELENIUM_BROWSER=[ chrome | firefox | ie | edge ]
    • SELENIUM_VERSION=[ version of browser ]
      • 11.0 (for IE)
      • 57.0 (for Chrome)
      • 52.0 (for Chrome/Firefox)
      • etc
    • SELENIUM_RESOLUTION=[widthxheight]

displayed?()

Returns true if the locator is displayed (visible).

focusedText

Returns the text of the currently focused element.

focusedValue

Returns the value of the currently focused element.

highlight()

Highlight the provided locator.

hover()

Mouseover the provided locator.

isFocused()

Returns true if the currently focused element matches the locator.

press()

Press the keyboard key.

setTimeout

Sets the default explicit default timeout (30 sec.)

addModel()

Add a model specified by a file (e.g. JSON). The model is a superset of a page object.

setDimension(width, height)

Set/resize browser viewport.

maximize

Maximize the browser.

quit

Quit browser (quit & close)

title

Get the title from the currently loaded page.

isChrome?

Returns true, if the browser under test is Chrome.

isTitle?()

Returns a boolean - based on whether the current title matches the provided regEx.

selected?()

Returns true, if the locator is 'selected' (e.g. radio/checkbox button)

type(, )