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
*** Settings *** | |
Resource steps_login.robot | |
Suite Teardown Close browser | |
*** Test Cases *** | |
Cenário: Login com sucesso | |
Dado que estou na tela de login no Chrome | |
Quando realizo o login | |
Então devo visualizar a mensagem "You logged into a secure area!" |
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
*** Settings *** | |
Resource steps_login.robot | |
Suite Teardown Close browser | |
*** Test Cases *** | |
Cenário: Login com sucesso | |
Dado que estou na tela de login no Firefox | |
Quando realizo o login | |
Então devo visualizar a mensagem "You logged into a secure area!" |
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
*** Settings *** | |
Library SeleniumLibrary | |
*** Variables *** | |
${url} https://the-internet.herokuapp.com/login | |
*** Keywords *** | |
Dado que estou na tela de login no ${browser} | |
open browser ${url} ${browser} |
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
Funcionalidade: login com sucesso | |
Contexto: | |
Dado que estou na tela de login | |
Cenário: login com sucesso utilizando username | |
Quando realizo o login utilizando "username" | |
Então devo ser direcionado à página principal | |
Cenário: login com sucesso utilizando email |
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
Dado("que estou na tela de login") do | |
pending # Write code here that turns the phrase above into concrete actions | |
end | |
Quando("realizo o login utilizando {string}") do |string| | |
pending # Write code here that turns the phrase above into concrete actions | |
end | |
Então("devo ser direcionado à página principal") do | |
pending # Write code here that turns the phrase above into concrete actions |
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
class LoginPage < SitePrism::Page | |
set_url "" | |
element :campo_usuario, "" | |
element :campo_senha, "" | |
element :btn_login, "" | |
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
Dado("que estou na tela de login") do | |
@pagina_login = LoginPage.new | |
@pagina_login.load | |
end | |
Quando("realizo o login utilizando {string}") do |usuario| | |
@pagina_login.campo_usuario.set USUARIO[usuario] | |
@pagina_login.campo_senha.set SENHA[usuario] | |
@pagina_login.btn_login.click | |
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
Feature: Successfull login | |
Background: | |
Given I am on the login screen | |
Scenario: Successful login using username | |
When I log in using "username" | |
Then I should be directed to the main page | |
Scenario: Successful login using email |
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
Given ("I am on the login screen") do | |
pending # write code here that turns the phrase above into concrete actions | |
end | |
When ("I log in using {string}") do | string | | |
pending # write code here that turns the phrase above into concrete actions | |
end | |
Then ("I should be directed to the main page") do | |
pending # write code here that turns the phrase above into concrete actions |
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
Given ("I am on the login screen") do | |
@login_page = LoginPage.new | |
@login_page.load | |
end | |
When ("I log in using {string}") do | user | | |
@login_page.user_field.set USER[user] | |
@login_page.password_field.set PASSWORD[user] | |
@login_page.btn_login.click | |
end |
OlderNewer