This file contains hidden or 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
let specPage = require('../pages/spec.po.js'); | |
let chai = require('chai'); | |
let chaiAsPromised = require('chai-as-promised'); | |
chai.use(chaiAsPromised); | |
let expect = chai.expect; | |
var { setDefaultTimeout } = require('cucumber'); | |
setDefaultTimeout(60 * 1050); | |
Before(async function () { |
This file contains hidden or 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
# Pull docker-selenium | |
docker pull elgalu/selenium | |
# Pull Zalenium | |
docker pull dosel/zalenium | |
# Run it! | |
docker run --rm -ti --name zalenium -p 4444:4444 \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v /tmp/videos:/home/seluser/videos \ |
This file contains hidden or 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
exports.config = { | |
seleniumAddress: 'http://user2:1234@localhost:4444/wd/hub', | |
multiCapabilities: [ | |
{ | |
browserName: 'firefox', | |
'name': 'Zalenium - Protractor - Firefox', | |
}, | |
{ | |
browserName: 'chrome', |
This file contains hidden or 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
# Usage: | |
# docker-compose up --force-recreate | |
version: '2.1' | |
services: | |
#--------------# | |
zalenium: | |
image: "dosel/zalenium" | |
container_name: zalenium | |
hostname: zalenium |
This file contains hidden or 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
/* | |
Basic configuration to run your cucumber | |
feature files and step definitions with protractor. | |
**/ | |
exports.config = { | |
capabilities: { | |
//ignoreSynchronization: true, | |
browserName: 'chrome', |
This file contains hidden or 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
{ | |
"name": "tests", | |
"version": "1.0.0", | |
"description": "protractor with cucumber and pageobject", | |
"main": "index.js", | |
"scripts": { | |
"pree2e": "webdriver-manager start & sleep 5", | |
"webdriver-update": "./node_modules/protractor/bin/webdriver-manager update --versions.chrome 2.37", | |
"e2e": "protractor protractor.docker.conf.js" | |
}, |
This file contains hidden or 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
FROM ubuntu:16.04 | |
RUN mkdir -p /usr/app/protractor | |
WORKDIR /usr/app/protractor | |
ADD . . | |
RUN apt-get update | |
RUN apt-get install -y curl wget dpkg | |
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb |
This file contains hidden or 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
let nameInput, | |
greeting; | |
module.exports = { | |
init: () => { | |
nameInput = element(by.model('yourName')); | |
greeting = element(by.binding('yourName')); | |
}, | |
get: (string) => { |
This file contains hidden or 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
let specPage = require('../pages/spec.po.js'); | |
describe('angularjs homepage', function() { | |
it('should greet the named user', function() { | |
specPage.init(); | |
specPage.get(); | |
specPage.setName('Julie'); | |
expect(specPage.getGreetingText()).toEqual('Hello Julie!'); | |
}); |
This file contains hidden or 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
/* | |
Basic configuration to run your cucumber | |
feature files and step definitions with protractor. | |
**/ | |
exports.config = { | |
capabilities: { | |
//ignoreSynchronization: true, | |
browserName: 'chrome', |
NewerOlder