Project

rudra

0.0
No commit activity in last 3 years
No release in over 3 years
Selenium IDE alternative using selenium-webdriver
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.9.25

Runtime

>= 3.9.0, ~> 3.9
>= 2.3.0, ~> 2.3
~> 3.142, >= 3.142.7
~> 4.4, >= 4.4.1
 Project Readme

rudra

Rudra: A Selenium IDE alternative using Ruby binding of selenium-webdriver.

Install

gem install rudra

How To Use

require 'rudra'

# Initailize using Chrome and zh-TW locale
rudra = Rudra.new browser: :chrome, locale: :zh_tw

# Initialize headless with 1920x1080 window size
rudra = Rudra.new headless: true, window_size: '1920,1080'

# Sample Steps
rudra.puts 'Search: webdriver'
rudra.open 'https://www.google.com'
rudra.puts 'Go to Google Search'
rudra.send_keys 'name=q', 'webdriver', :enter
rudra.puts 'Wait until page title contains: webdriver'
rudra.wait_for_title 'webdriver'
rudra.puts 'Scroll to footer'
rudra.scroll_into_view '#fbar'
rudra.puts 'Draw a redmark'
rudra.draw_redmark '#fsl'
rudra.puts 'Save a screenshot'
rudra.save_screenshot 'sample_screen'
rudra.puts 'Clear the drawing'
rudra.clear_drawings
rudra.puts 'Quit the driver'
rudra.quit

#
# Rudra supports Basic/Digest Authentication using a built-in Chrome extension
#
require 'rudra'

rudra = Rudra.new auth_username: 'guest', auth_password: 'guest'
rudra.puts 'Basic/Digest Authentication Test'
rudra.open 'https://jigsaw.w3.org/HTTP/Basic/' # Basic Authentication test
# rudra.open 'https://jigsaw.w3.org/HTTP/Digest/' # Digest Authentication test
rudra.save_screenshot 'Authentication Pass'
rudra.quit

Supported locator

Format: 'how=what'

  • css=.btn
  • class=btn-primary
  • id=frame1
  • name=j_username
  • xpath=//span/a
  • etc

If how is not specified, locator starting with / or ( will be parsed as xpath, while ., [ and # are treated as css.

css pseudo selector support => :eq()

Documentation