This file contains 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
if (digitos == juniper) { | |
WebElement verQuartos = driver.findElement(By.xpath("html/body/div[1]/div[2]/main/div/div/section/aside/div/div/div/div/div/a")); | |
verQuartos.click(); | |
Thread.sleep(2000); | |
WebElement continuar = driver.findElement(By.xpath("html/body/div[1]/div[2]/main/div/div/section/div[3]/div[2]/aside/div/div/div/div/a")); | |
continuar.click(); | |
} else if (digitos == expedia) { | |
System.out.println("Broker: " + digitos); | |
driver.navigate().refresh(); | |
} else if (digitos == hotelbeds) { |
This file contains 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
public void OrigemComAjax(String origem, WebDriver driver){ | |
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); // define o tempo de espera maximo para o carregamento de um elemento da pagina. | |
WebElement campoOrigem = driver.findElement(By.cssSelector("input[class='from txtOrigin grid-full autocomplete_empty']")); | |
campoOrigem.sendKeys(origem); | |
int limiteTentativas = 0; | |
while(this.validarRetornoAjaxOrigem(driver)){ |
This file contains 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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>br.com.cvc</groupId> | |
<artifactId>automacao_Site_Cvc_deslogado_Responsivo</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<packaging>jar</packaging> | |
<name>automacao_Site_Cvc_deslogado_Responsivo</name> |
This file contains 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
String janelaAtual = driver.getWindowHandle(); | |
Set<String> janelas = driver.getWindowHandles(); | |
for (String janela : janelas) { | |
driver.switchTo().window(janela); | |
if(driver.getCurrentURL().equals("URL DO BROWSER")) { | |
break; | |
} | |
} |
This file contains 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
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>3.0</version> | |
<configuration> | |
<compileVersion>1.8</compileVersion> |
This file contains 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
#Comandos úteis do Maven | |
Criação de Projeto | |
desktop java (jar) | |
mvn archetype:generate \ | |
-DarchetypeGroupId=org.apache.maven.archetypes \ | |
-DarchetypeArtifactId=maven-archetype-quickstart \ | |
-Dversion=1.0-SNAPSHOT \ | |
-DgroupId=com.erkobridee.exemplo.mvn \ |
This file contains 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
Fases do build | |
Algo interessante sobre este post é que o que será abordado é sempre referente a ‘um pouco’, ou ‘um pouco melhor’. Isso porque o maven é uma ferramenta bastante complexa dependendo do nível de customização e da necessidade que se tenha. A primeira parte do post cobre as fases executadas durante o build. | |
Uma fase nada mais é do que um estágio onde são executadas algumas regras sobre o projeto e se obtem algum resultado no final. Por exemplo, a fase de testes roda os testes da aplicação e obtém um ‘OK’ ou um ‘FAIL’, no segundo caso o build é interrompido. Tais fases são executadas dentro do ‘lifecycle‘ do build. O ‘lifecycle‘ é composto de ‘goals‘ e são estes: | |
Validate | |
Compile | |
Test | |
Package |
This file contains 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
print "Type the text with s:" | |
user_input = gets.chomp #gets method the object string that capture text user, chomp clean the line | |
user_input.downcase! #downcase method caixa baixa letter | |
if user_input.include? "s" #include if contains letter s return true | |
user_input.gsub!(/s/, "th") #gsub troca o s pelo th | |
else | |
print "Nothing to do here!" | |
end |
This file contains 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
dnf install ruby ruby-devel libxml2-devel redhat-rpm-config | |
If using mariadb, dnf install mariadb-devel | |
If using sqlite, dnf install sqlite-devel | |
gem install bundler | |
For gem capybara-webkit: (if you get error due to this gem) | |
dnf install qt-devel | |
QMAKE=/usr/bin/qmake-qt4 (in the same shell as bundle install) | |
bundle install or gem install capybara-webkit will now succeed | |
This file contains 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
https://www.if-not-true-then-false.com/2010/install-google-chrome-with-yum-on-fedora-red-hat-rhel/ |
OlderNewer