mardi 25 juillet 2017

Ruby Script that runs list of irb watir commands

I regularly use the irb for testing out cucumber watir webdriver steps on a browser. This involves opening the irb and typing in a list of the same commands. The first few commands are always

  1. require 'watir-webdriver'
  2. browser = Watir::Browser.new(:chrome)
  3. b.goto 'www.foo.com'

the list of commands goes on like this. Every time I open the irb I have to go through all of these. Does anyone have any idea of a script which could be run to automate a list of commands such as the above? So that it would open the IRB and then go through the commands one by one saving me load of time.

Any help is greatly appreciated.

Aucun commentaire:

Enregistrer un commentaire