class LuckyFlow
- LuckyFlow
- Reference
- Object
Included Modules
- Habitat::SettingsHelpers
- Habitat::TempConfig
- LuckyFlow::Expectations
Defined in:
lucky_flow.cr:4lucky_flow.cr:9
lucky_flow/errors.cr
lucky_flow/expectations.cr
lucky_flow/version.cr
Constant Summary
-
HABITAT_SETTINGS =
[{decl: screenshot_directory : String = "./tmp/screenshots", example: nil, validation: nil}, {decl: base_uri : String, example: nil, validation: nil}, {decl: retry_delay : Time::Span = 10.milliseconds, example: nil, validation: nil}, {decl: stop_retrying_after : Time::Span = 1.second, example: nil, validation: nil}, {decl: chromedriver_path : String | ::Nil = nil, example: nil, validation: nil}, {decl: browser_binary : String | ::Nil = nil, example: nil, validation: nil}] of Nil
-
SERVER =
LuckyFlow::Server::INSTANCE
-
VERSION =
"0.6.0-preview"
Class Method Summary
Instance Method Summary
-
#append(name_attr : String, with value : String)
Add text to the end of a field
- #click(css_selector : String)
- #el(css_selector : String, text : String)
- #el(css_selector : String)
- #expand_page_to_fullsize
- #field(name_attr : String)
-
#fill(name_attr : String, with value : String)
Set the text of a form field, clearing any existing text
-
#fill_form(form : Avram::SaveOperation.class | Avram::Operation.class, **fields_and_values)
Fill a form created by Lucky that uses an Avram::SaveOperation
- #open_screenshot(process = Process, time = Time.now, fullsize = false) : Void
- #session
- #settings
- #take_screenshot(filename : String = generate_screenshot_filename, fullsize : Bool = true)
- #visit(path : String)
- #visit(action : Lucky::Action.class, as user : User | Nil = nil)
- #visit(route_helper : Lucky::RouteHelper, as user : User | Nil = nil)
- #with_fullsized_page(&)
Class Method Detail
Instance Method Detail
def append(name_attr : String, with value : String)
#
Add text to the end of a field
fill("comment:body", with: "Lucky is:")
append("comment:body", " So much fun!")
def fill(name_attr : String, with value : String)
#
Set the text of a form field, clearing any existing text
fill("comment:body", with: "Lucky is great!")
Fill a form created by Lucky that uses an Avram::SaveOperation
Note that Lucky and Avram are required to use this method
fill_form QuestionForm,
title: "Hello there!",
body: "Just wondering what day it is"
def take_screenshot(filename : String = generate_screenshot_filename, fullsize : Bool = true)
#