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
def select_date_flight_package(type, month, day) | |
#passa o valor do id para um novo objeto type | |
type = capture_date(type) | |
#acessa o objeto input e clica nele | |
find("##{type}").click | |
#pika-next = next month seta | |
find('.pika-next').click while has_no_text?(month) | |
#pika-lendar calendar all. Ele altera a volta true no mes que passou na variavel | |
within('.pika-lendar', text: month) do | |
#acessa o pika lendar dentro tem uma tag td que possui um dia que ao encontra-lo com o objeto day clica nele |
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
echo ... 0ff | |
title .:: Abrir All Cenarios CVC Responsivo::. | |
echo direcionamento 1 | |
cd %~dp0Workspace_Jenkins\ruby_responsivo\cenarios_aereo | |
start /wait cmd /c "Aereo_Responsivo.bat & exit" | |
echo direcionamento 2 | |
cd %~dp0Workspace_Jenkins\ruby_responsivo\cenarios_hoteis |
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
text = variavel local | |
@text = variavel de estancia | |
@@text = variavel de classe | |
$text = variavel global | |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= |
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
require "rubygems" | |
require "json" | |
require "net/http" | |
require "uri" | |
uri = URI.parse("http://api.sejmometr.pl/posiedzenia/BZfWZ/projekty") | |
http = Net::HTTP.new(uri.host, uri.port) | |
request = Net::HTTP::Get.new(uri.request_uri) |
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
# copy and paste this into your terminal to start an IRB session and use Capybara's DSL to write tests interactively | |
# Thanks to Tom Clements | |
# http://tom-clements.com/blog/2012/02/25/capybara-on-the-command-line-live-browser-testing-from-irb/ | |
# I prefer using chrome... | |
# First you need to install the chromedriver https://sites.google.com/a/chromium.org/chromedriver/downloads | |
# Unzip, and move the executable somewhere in your path... | |
# e.g. | |
mv ~/Downloads/chromedriver /usr/local/bin |
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
# instalar a GEM pry | |
gem install pry pry-doc | |
# executa console | |
pry | |
# curiosidades: | |
# auto-complete com TAB | |
# entrar no contexto do objeto com cd <objeto> | |
# possui paginação automatica |
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
#tipos de condicionais | |
#primeira maneira - default | |
a = 1 | |
if a == 1 | |
puts "oi" | |
end | |
#tudo em uma linha | |
puts "oi" if a == 1 |
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
# Operadores logicos - utilizamos dentro de um if, unless, while | |
################################################################### | |
#Comparação | |
== | |
a = 2 | |
if a == 2 | |
puts "faça algo" | |
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
#While - enquanto - precisa de uma valvular de escape | |
#valvula de escape | |
index = 0 | |
#enquanto o que o index for menor que 5 imprima ele | |
while index < 5 | |
puts index | |
index +=1 | |
end | |
#imprime de 0 a 4 |