class LuckyFlow
- LuckyFlow
- Reference
- Object
Overview
require "lucky_flow/ext/lucky"
Included Modules
- AuthenticLuckyFlowHelpers
- AvramLuckyFlowHelpers
- Habitat::SettingsHelpers
- Habitat::TempConfig
- LuckyActionLuckyFlowHelpers
- LuckyFlow::Expectations
Defined in:
ext/authentic.crext/avram.cr
ext/lucky.cr
lucky_flow.cr:7
lucky_flow.cr:13
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: driver_path : String | ::Nil, example: nil, validation: nil}] of Nil
-
VERSION =
"0.10.0"
Class Method Summary
- .configure(&)
- .default_driver=(value : String)
- .driver(name : String) : LuckyFlow::Driver
- .driver : LuckyFlow::Driver
- .reset : Nil
- .settings
- .shutdown : Nil
- .use_default_driver
Instance Method Summary
- #accept_alert
-
#append(name_attr : String, with value : String)
Add text to the end of a field
- #click(css_selector : String)
- #current_path
- #dismiss_alert
- #driver : LuckyFlow::Driver
- #el(css_selector : String, text : String) : LuckyFlow::Element
- #el(css_selector : String) : LuckyFlow::Element
- #expand_page_to_fullsize
- #field(name_attr : String) : LuckyFlow::Element
-
#fill(name_attr : String, with value)
Set the text of a form field, clearing any existing text
- #fill(element : Element, with value)
- #html : String
- #open_screenshot(process = Process, time = Time.utc, fullsize = false) : Void
- #pause
-
#select(name_attr : String, value : Array(String) | String)
Select an option from a select element
- #select(element : Element, value : String)
- #select(element : Element, value : Array(String))
- #settings
- #take_screenshot(filename : String = generate_screenshot_filename, fullsize : Bool = true)
- #visit(path : String)
- #with_fullsized_page(&)
Instance methods inherited from module LuckyActionLuckyFlowHelpers
visit(action : Lucky::Action.class)visit(route_helper : Lucky::RouteHelper) visit
Instance methods inherited from module AvramLuckyFlowHelpers
fill_form(form : Avram::SaveOperation.class | Avram::Operation.class, **fields_and_values)
fill_form
Instance methods inherited from module AuthenticLuckyFlowHelpers
visit(action : Lucky::Action.class, as user : User)visit(route_helper : Lucky::RouteHelper, as user : User) visit
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)
#
Set the text of a form field, clearing any existing text
fill("comment:body", with: "Lucky is great!")
def select(name_attr : String, value : Array(String) | String)
#
Select an option from a select element
select("post:category", value: "rant")
If given an Array(String), the select is assumed to have the 'multiple' attribute
and will raise a LuckyFlow::InvalidMultiSelectError
if it doesn't.
select("post:tags", value: ["rant", "technology"])
def take_screenshot(filename : String = generate_screenshot_filename, fullsize : Bool = true)
#