whaly

Whaly is the easy way to write a browser-based selenium scripts for ruby users.It's fully focused on the words, because words better than codes.it's written in ruby language.it's only compatible for ruby language (not for another programming language)


Keywords
automation, bdd-style, bdd-style-testing-framework, chrome, firefox, for, ie, linux, ruby, selenium, test, test-automation, testing, text-based
License
MIT
Install
gem install whaly -v 1.0.4

Documentation



GitHub stars GitHub forks GitHub issues npm GitHub

Description

whaly is the easy way to write a browser-based selenium scripts.It's fully focused on the words, because words better than codes.it's written in ruby language.

Phase

-pre-release

Note: maybe it's contains few bugs

packages avaliable for install too

npm i whaly

highlights

  • you can write words instead of codes
  • runs smoothly without delay
  • builtin ruby
  • easy to use

how to setup ?

In your bash,
alias whaly='bash whalys/whaly-runner.sh'

how to run ?

whaly <your text filename> [--options]

Example:
    whaly google.txt --create

demo

whaly_demos_edit_0.webm

whaly automatically write a selenium based by whaly

whaly_dd_edit_0_edit_4

after you completely written it, just stop it ctrl + c

list of all valid whaly - pre-release

if you write this in whaly produce
@import - whaly-engine require 'selenium-webdriver'
whaly-start-engine c driver = Selenium::WebDriver.for(:chrome)
go to the url "https://www.google.com" driver.navigate.to('https://www.google.com')
find name is 'q' .click driver.find_element(:name, 'q' ).click
delay-for 0.2 sleep 0.2
select name isz 'animals' and select-by - value - 'dog' Selenium::WebDriver::Support::Select.new(driver.find_element(:name, 'animals' )).select_by( value , 'dog')
stop-whaly-engine -quit driver.quit
add-cookies { name: 'hello' , value: 'howareyou' , same_site: 'Strict'} driver.manage.add_cookie(name: 'hello',value: 'howareyou',same_site: 'Strict')
show l-all-cookies driver.manage.all_cookies
show -Scookies - 'foo' driver.manage.cookie_named('foo')
del -Dcookies - 'foo' driver.manage.delete_all_cookies('foo')
del d-all-cookies driver.manage.delete_all_cookies
I/O keyboard key-up:(shift).send-keys(4,2).key-down.('how are you').send-keys(:shift).perform driver.action.key-up:(shift).send-keys(4,2).key-down.('how are you').send-keys(:shift).perform
<-- button driver.navigate.back
--> button driver.navigate.forward
just refresh!! driver.navigate.refresh
whaly-start-engine 
c for chrome
f for firefox
i for ie

Try this Example below:

step 1: create empty file name as google.txt <br>
step 2: whaly google.txt --create <br>
step 3: whaly google.txt --run

google.txt

@import - whaly-engine

start-whaly-engine c

go to the url 'https://www.google.com'

delay-for 3
find name is 'q'.send_keys('how are you man')
find xpath is '/html/body/div[1]/div[3]/form/div[1]/div[1]/div[4]/center/input[1]'.click

delay-for 2
stop-whaly-engine -quit

output:

this file automatically located at whalytest-scripts/whalytest_demo.txt.rb

directory

require 'selenium-webdriver'

driver = Selenium::WebDriver.for(:chrome)

driver.navigate.to('https://www.google.com')
sleep 3
driver.find_element(:name, 'q').send_keys('how are you man')
driver.find_element(:xpath, '/html/body/div[1]/div[3]/form/div[1]/div[1]/div[4]/center/input[1]').click

sleep 2
driver.quit

code comparsion

code_comparsion

list of whaly shell commands

arguments definition
--run complier the file continously
whaly [your filename] --run
--create create a file format to ruby
whaly [filename] --create
--about about whaly
whaly --about

main focus of whaly

- anybody can use without any prior programming knowledge
- easy to use

Support Me

support me on ko-fi.com

copyright & license

copyright @ Suresh P | All rights reserved | MIT License