-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from diegoquirino/v6.0-selenide
V6.0 selenide
- Loading branch information
Showing
9 changed files
with
52 additions
and
94 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
target | ||
build | ||
.idea | ||
*.iml |
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
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
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
1 change: 0 additions & 1 deletion
1
.../br/pro/diegoquirino/calculadora/ux/REQ002_AjudaDoSistema/REQ002_AjudaDoSistemaSteps.java
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
30 changes: 10 additions & 20 deletions
30
src/test/java/br/pro/diegoquirino/calculadora/ux/pages/AjudaDoSistemaPageObject.java
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
22 changes: 8 additions & 14 deletions
22
src/test/java/br/pro/diegoquirino/calculadora/ux/pages/CompartilhadosPageObject.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,18 @@ | ||
package br.pro.diegoquirino.calculadora.ux.pages; | ||
|
||
import net.serenitybdd.core.pages.PageObject; | ||
import org.openqa.selenium.WebElement; | ||
import org.openqa.selenium.support.FindBy; | ||
import static com.codeborne.selenide.Selenide.*; | ||
|
||
public class CompartilhadosPageObject extends PageObject { | ||
import net.serenitybdd.core.annotations.findby.By; | ||
import static com.codeborne.selenide.Condition.*; | ||
|
||
@FindBy(id = "index.navlink.ajuda") | ||
private WebElement linkMenuAjuda; | ||
public class CompartilhadosPageObject { | ||
|
||
@FindBy(id = "index.navlink.contato") | ||
private WebElement linkMenuContato; | ||
|
||
|
||
public void acessarLinkMenuAjuda() { | ||
this.linkMenuAjuda.click(); | ||
public static void acessarLinkMenuAjuda() { | ||
$(By.id("index.navlink.ajuda")).shouldHave(text("Ajuda")).click(); | ||
} | ||
|
||
public void acessarLinkMenuContato() { | ||
this.linkMenuContato.click(); | ||
public static void acessarLinkMenuContato() { | ||
$(By.id("index.navlink.contato")).shouldHave(text("Contato")).click(); | ||
} | ||
|
||
} |
66 changes: 18 additions & 48 deletions
66
src/test/java/br/pro/diegoquirino/calculadora/ux/pages/MensagemDeContatoPageObject.java
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
9 changes: 7 additions & 2 deletions
9
src/test/java/br/pro/diegoquirino/calculadora/ux/pages/PaginaInicialPageObject.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
package br.pro.diegoquirino.calculadora.ux.pages; | ||
|
||
import com.codeborne.selenide.Selenide; | ||
import com.codeborne.selenide.WebDriverRunner; | ||
import net.serenitybdd.core.pages.PageObject; | ||
import net.thucydides.core.webdriver.WebDriverFacade; | ||
|
||
public class PaginaInicialPageObject extends PageObject { | ||
|
||
public void acessarPaginaInicial(){ | ||
this.getDriver().manage().window().maximize(); | ||
this.getDriver().get("http://diegoquirino.pro.br/calculadora"); | ||
// Passando o driver de execução para o Selenide | ||
WebDriverRunner.setWebDriver(((WebDriverFacade)this.getDriver()).getProxiedDriver()); | ||
WebDriverRunner.getWebDriver().manage().window().maximize(); | ||
Selenide.open("http://diegoquirino.pro.br/calculadora"); | ||
} | ||
|
||
} |