This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on_page HomePage do |page| | |
page.input_search_element.when_visible(30) | |
page.input_search = "Meu termo de busca" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on_page HomePage do |page| | |
sleep(30) | |
page.input_search = "Meu termo de busca" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: UTF-8 | |
require 'page-object' | |
require_relative '../../../config/env' | |
class HomePage | |
include PageObject | |
page_url "http://www.blogdopedro.net/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
page.text_field # retorna o valor do campo de text ou (se for um link ou button), clica no element | |
page.text_field= # Atribuí um valor | |
page.text_field_element # Retorna o próprio elemento |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rake cucumber | |
/Users/pedrolopesme/.rvm/rubies/ruby-1.9.3-p448/bin/ruby -S bundle exec cucumber --profile default | |
Using the default profile... | |
Feature: Search For PageObject Article | |
As a Blog do Pedro visitor | |
I want to find for PageObjects article | |
Scenario: # features/001_search_for_pageobject_article.feature:6 | |
Given I am on Blog do Pedro's Home Page # features/steps_definitions/001_search_for_pageobject_article.rb:3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BoletoItau | |
def initialize(valor, vencimento) | |
@valor = valor | |
@vencimento = vencimento | |
end | |
def gerar_boleto | |
puts("Header do Boleto para o Banco Itau") | |
puts("Valor:" + @valor ) | |
puts("Vencimento:" + @vencimento ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BoletoSantander | |
def initialize(valor, vencimento) | |
@valor = valor | |
@vencimento = vencimento | |
end | |
def gerar_boleto | |
puts("Header do Boleto para o Banco Santander") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Boleto | |
def initialize(valor, vencimento) | |
@valor = valor | |
@vencimento = vencimento | |
end | |
def gerar_boleto | |
gerar_header | |
gerar_valor | |
gerar_vencimento | |
gerar_footer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Banco Itaú | |
class BoletoItau < Boleto | |
def gerar_header | |
puts("Header do Boleto para o Banco Itau") | |
end | |
def gerar_footer | |
puts("Footer do Boleto : Esse boleto deve ser pago no Banco Itau mais proximo") | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BASIC COMMAND | |
$ wget -q https://registry.hub.docker.com/v1/repositories/<USER>/<IMAGE>/tags -O - | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | awk -F: '{print $3}' | |
# EXAMPLE: LISTING ALL JBOSS IMAGES | |
$ wget -q https://registry.hub.docker.com/v1/repositories/jboss/wildfly/tags -O - | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | awk -F: '{print $3}' | |
# OUTPUTS : | |
latest | |
10.0.0.Final | |
10.1.0.Final |