Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Fix stack of undefined issue #5513

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
version: 2
jobs:
build:
docker:
- image: circleci/node:10.16-browsers
environment:
# Fix issue with selenium-server in containers.
# See http://github.com/SeleniumHQ/docker-selenium/issues/87
DBUS_SESSION_BUS_ADDRESS: /dev/null
CHROME_REVISION: 652421
CHROMEDRIVER_VERSION: 75.0.3770.90
# To find this revision number:
# 1. Find the exact chrome version you want: https://en.wikipedia.org/wiki/Google_Chrome_version_history
# 2. Put that version in this tool: https://omahaproxy.appspot.com/
# 3. Take the bumber from "Branch Base Position"
# 4. Look for the closest number to that revision in the snapshots: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/
# CHROME 74 - 638880
# CHROME 75 - 652421
# CHROME 79 - 706915
steps:
- checkout
- run:
name: Install Dependencies
command: |
sudo apt-get update
sudo apt-get install python-pip openjdk-8-jdk tcpdump

# Install a specific version of Chrome (not latest)
sudo rm -rf /opt/google
sudo rm /usr/local/bin/chromedriver
wget -q -O chrome.zip https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/${CHROME_REVISION}/chrome-linux.zip
unzip chrome.zip
rm chrome.zip
sudo ln -sf ${PWD}/chrome-linux/chrome /usr/bin/chromium
sudo ln -sf /usr/bin/chromium /usr/bin/chromium-browser
sudo groupadd -r chrome && sudo useradd -r -g chrome -G audio,video chrome
sudo mkdir -p /home/chrome/reports
sudo chown -R chrome:chrome /home/chrome

- restore_cache:
key: node_modules-{{ .Branch }}-{{ checksum "package-lock.json" }}

- run:
name: NPM Install
command: |
npm i
cd testapp && npm i

- save_cache:
key: node_modules-{{ .Branch }}-{{ checksum "package-lock.json" }}
paths:
- "node_modules"
- "testapp/node_modules"

- run:
name: Lint
command: ./node_modules/.bin/gulp lint

- run:
name: Selenium Start
background: true
command: |
./node_modules/.bin/webdriver-manager update --versions.standalone=3.141.59 --versions.chrome=${CHROMEDRIVER_VERSION} --versions.gecko=v0.26.0
sudo cp ./node_modules/webdriver-manager/selenium/chromedriver_${CHROMEDRIVER_VERSION} /usr/local/bin/chromedriver
./node_modules/.bin/webdriver-manager start --versions.standalone=3.141.59 --versions.chrome=${CHROMEDRIVER_VERSION} --versions.gecko=v0.26.0

- run:
name: TestApp Start
background: true
command: |
npm start

- run:
name: Test
command: npm test
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: node_js
sudo: false
node_js:
- "6"
- "8"
- "10"
- "12"

env:
global:
Expand All @@ -24,9 +24,9 @@ matrix:
- env: "JOB=bstack"
exclude:
- env: JOB=smoke
node_js: "7"
node_js: "10"
- env: JOB=bstack
node_js: "7"
node_js: "10"

addons:
apt:
Expand All @@ -42,7 +42,8 @@ before_script:
- npm run install_testapp
- npm run pretest
- mkdir -p $LOGS_DIR
- ./scripts/travis_setup.sh
- scripts/travis_setup.sh


script:
- ./scripts/testserver.sh
Expand Down
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,46 @@
# 7.0.0

- ([9d2e18e](https://github.com/angular/protractor/commit/9d2e18e10d82a97bee58193968f22be6cd1f04e9))
refactor: use console.log instead of util.puts

utils.puts is no longer available in Node.JS 12

- ([c281157](https://github.com/angular/protractor/commit/c28115755d4de5c2ad4c43fc11feab26a928982f))
refactor: remove debugger and explore methods

BREAKING CHANGE: Debugger and explore methods are not compatable with Node 8+. Use `debugger`
keyword instead. See: https://goo.gl/MvWqFh

- ([7cdb978](https://github.com/angular/protractor/commit/7cdb978fca5ae3f5ed95a535ea39b9ee91fb6d2d))
build: update several dev packages that have security issues

- ([8e82835](https://github.com/angular/protractor/commit/8e82835024463cdb17813d19589be0e66bac7992))
build: update webdriver-manager

- ([a1fe5f2](https://github.com/angular/protractor/commit/a1fe5f2ad05ab55b1dafd429f0c31fea27ec3e5b))
ci: update tests to run on Node 10 and 12

- ([3fc9220](https://github.com/angular/protractor/commit/3fc9220189a59750226328a837b42802d18e503a))
fix: prototype Pollution vulnerability through outdated yargs package

BREAKING CHANGE:

Node.Js version 6 and 8 are no longer supported. Please update to Node.Js 10+

Closes #5431

# 5.4.4

## Fixes

- fix: security prototype pollution

# 5.4.3

## Fixes

fix(index.ts): Fix exports to unbreak TypeScript 3.7 build

# 5.4.2

## Features
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ Protractor [![Build Status](https://travis-ci.org/angular/protractor.svg?branch=
Compatibility
-------------

Protractor 5 is compatible with nodejs v6 and newer.
Protractor 5 is compatible with Nodejs v6 and v8 only.

Protractor 6 has been deprecated.

Protractor 7 is compatible with Nodejs v10, v12, and newer.

Protractor works with AngularJS versions greater than 1.0.6/1.1.4, and is compatible with Angular applications. Note that for Angular apps, the `binding` and `model` locators are not supported. We recommend using `by.css`.

Expand Down
46 changes: 0 additions & 46 deletions bin/elementexplorer.js

This file was deleted.

72 changes: 0 additions & 72 deletions circle.yml

This file was deleted.

45 changes: 0 additions & 45 deletions docs/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,51 +258,6 @@ used from the browser's console.
> window.clientSideScripts.findInputs('username', document.getElementById('#myEl'));
```

**Testing Out Protractor Interactively**

When debugging or first writing test suites, you may find it helpful to
try out Protractor commands without starting up the entire test suite. You can
do this with the element explorer.

To run element explorer, simply run protractor as you normally would, but pass in
the flag --elementExplorer:

protractor --elementExplorer

This will load up the URL on WebDriver and put the terminal into a REPL loop.
You will see a > prompt. The `browser`, `element` and `protractor` variables will
be available. Enter a command such as:

> browser.get('http://www.angularjs.org')

or

> element(by.id('foobar')).getText()

Typing tab at a blank prompt will fill in a suggestion for finding
elements. You can also use the `list(locator)` command to list all elements
matching a locator.

Element explorer will start chrome by default. However, you can specify
another browser, change browser settings, or specify any other config that you
normally would with your protractor test. To do this, pass configs to
protractor like you normally would,
but with the `--elementExplorer` flag set:

protractor [configFile] [options] --elementExplorer

For example, to connect to ChromeDriver directly, use

protractor --directConnect --elementExplorer

Element explore will ignore your specs, not set up your framework (e.g. jasmine,
mocha, cucumber), and only allow you to pass in 1 capability, but will honor
every other parameter in your config.

Note `baseUrl` is used here as the initial page, i.e. element explorer will try
to navigate to `baseUrl` automatically on start.


## Taking Screenshots

WebDriver can snap a screenshot with `browser.takeScreenshot()`. This can be a
Expand Down
7 changes: 4 additions & 3 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,13 @@ is complete before continuing.

How do I switch off an option in the CLI?
-----------------------------------------
i.e. `webdriver-manager update --chrome=false` does not work.
This has to do with the way `optimist` parses command line args. In order to pass a false value, do one of the following:
This has to do with the way `yargs` parses command line args. In order to pass a false value, do one of the following:

1) `webdriver-manager update --chrome=0`

2) `webdriver-manager update --no-chrome` (see https://github.com/substack/node-optimist#negate-fields)
2) `webdriver-manager update --chrome=false`

3) `webdriver-manager update --no-chrome` (see https://github.com/yargs/yargs/blob/HEAD/docs/tricks.md#negate)

Why does Protractor fail when I decorate $timeout?
--------------------------------------------------
Expand Down
Loading