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
import textInputPage from '../pages/textInput.page'; | |
describe('Text Input Spec', function() { | |
it('Change button text with chai', function() { | |
textInputPage | |
.open() | |
.updateButtonText('My Special Name'); | |
expect(textInputPage.getButtonText()).toEqual('My Special 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
import Page from './page'; | |
class TextInput extends Page { | |
get nameField() {return $('#newButtonName');} | |
get button() {return $('#updatingButton');} | |
open() { | |
super.open('textinput'); | |
return this; | |
} |
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
export default class Page { | |
constructor() { | |
this.title = 'my Page'; | |
} | |
open(path) { | |
browser.url(path); | |
} | |
verifyTextInPage(text) { |
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
export default class ModalComponent { | |
constructor(element) { | |
this.element = element; | |
} | |
get title() {return this.element.$('h3').getText();} | |
get content() {return this.element.$('p').getText();} | |
} |
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
// npm i puppeteer | |
const puppeteer = require('puppeteer'); | |
(async () => { | |
const browser = await puppeteer.launch(); | |
const page = await browser.newPage(); | |
await page.goto('http://www.google.com'); | |
const text = await page.$eval('#username',elem => elem.innerText) | |
console.log(text); | |
await page.screenshot({path: 'example.png'}); |
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
package qualify.appium; | |
import org.openqa.grid.internal.utils.DefaultCapabilityMatcher; | |
import java.util.Map; | |
/** | |
* This class is for nodes to determine Capability Matching using deviceName. | |
* For Capability Matcher change: | |
* - java -jar QualifyMatcher.jar -role hub -capabilityMatcher qualify.appium.QualifyMatcher |