Last active
July 4, 2018 12:55
-
-
Save uLucasFraga/d82a6809d1bae5abbb71037cb61c3072 to your computer and use it in GitHub Desktop.
ARQUIVO PAGE-OBJECTS
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
'use strict' | |
// protractor/features/pages/calculator_po.js | |
class CalculadoraPage { | |
constructor() { | |
this.firstField = element(by.model('first')), | |
this.secondField = element(by.model('second')), | |
this.goButton = element(by.id('gobutton')), | |
this.colResult = element(by.cssContainingText('.table', 'Result')), | |
this.result = element(by.binding('latest')), | |
this.table = element(by.css('.table th')), | |
this.sub = element(by.cssContainingText('option', '-')) | |
} | |
visit() { | |
return browser.get('') | |
} | |
adicionar(one, two) { | |
this.firstField.clear(); | |
this.firstField.sendKeys(one); | |
this.secondField.clear(); | |
this.secondField.sendKeys(two); | |
return this.goButton.click(); | |
} | |
subtrair(one, two) { | |
this.firstField.clear(); | |
this.firstField.sendKeys(one); | |
this.secondField.clear(); | |
this.secondField.sendKeys(two); | |
this.sub.click(); | |
return this.goButton.click(); | |
} | |
}; | |
module.exports = CalculadoraPage; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment