Skip to content

Instantly share code, notes, and snippets.

@javigomez
Created November 23, 2017 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javigomez/1307ab81d443c107a964c335d63730c4 to your computer and use it in GitHub Desktop.
Save javigomez/1307ab81d443c107a964c335d63730c4 to your computer and use it in GitHub Desktop.
test step
# file: features/support/pages/short_text_block.rb
module InputTextBlock
include PageObject
text_field(:text_input, css: '.is-focused input')
button(:ok_button, css: '.is-focused .stkv-qa-block-btn.is-visible .stkv-qa-block-btn__button')
def commit_answer
self.fill_answer
self.click_ok_button
end
def fill_answer(answer = $data[:answer][:short_text])
self.text_input = answer
end
def click_ok_button
self.ok_button
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment