Changelog History
Page 2
-
v5.3.1 Changes
April 03, 2018๐ Features
- (cc2234c) feat(logger): Add log level configuration (#1451) (#4068)
๐ Fixes
(c63b99e) fix(grep): change excluded tests to disabled instead of pending (#4673)
(9348ccf) docs(page_objects): Remove unnecessary "await" and "async" (#4732)
(4898db0) docs(plugins) add protractor-cucumber-steps plugin to plugins.md (#4721)
(a7411b6) docs(page_objects): Add async / await example (#4675)
-
v5.3.0 Changes
January 25, 2018๐ Features
(9d87982) feat(config): allow to use newer versions of CoffeeScript (#4567) CoffeeScript lost the hyphen in the module name about 9 months ago, all the new versions are going to be released as coffeescript not the coffee-script
(6ba30e0) feat(driverProviders): Add TestObject and Kobiton as driverProviders Add TestObject and Kobiton as driverProviders
- Add testObject and kobiton to driverProviders
- Add testObject and kobiton items to cli, config and index
- Add instructions for using testObject and kobiton to server-setup
๐ Fixes
(a62a154) fix(script): fix compile-to-es5 script (#4676) make compile-to-es5 script rely on native es6-promise typing
(964baba) fix(clientsidescript): avoid returning the value of test callback in waitForAngular (#4667) The return value could be interpreted as an error by mistake in some situation Also fix a wrong if-condition in error reporting
(83e2ba8) fix(website): Locator by.name('field_name') (#4653)
(02746dd) fix(browser): Add space after full stop in error message. (#4594) Linkifiers interpret the ".If" at the end of the URL as part of the URL.
(7f968e0) fix(direct): Use config's geckoDriver when specified (#4554) This change makes the
firefox
capability more closely matchchrome
's. Thefirefox
capability was not looking forconfig_.geckoDriver
likechrome
was.(f9df456) docs(element): fix minor typo in element.ts (#4471)
(65f206e) docs(website): updated reference from ignoreSynchronization to waitForAngularEnabled(false). (#4632)
Dependencies
- (335680f)
fix(circleCI): lock the currect version of all dependencies (#4669)
CircleCI was broken by the new release of gulp-clang-format and jasmine
- pin the version of gulp-clang-format to 1.0.23
- pin jasmine version to 2.8.0
- add lock file
-
v5.2.2 Changes
December 12, 2017๐ Fixes
(b3c7404) Revert "fix(jasmine): Update Jasmine to support Node8 async/await (#4608)" This reverts commit 5d13b00bca651227eb55616363f7d7eb8a91f8e8. This commit is unnecessary now, revert this commit to avoid breaking changes in 5.2.1
(8e5ad1f) fix(doc): remove unnecessary config in debugging doc/example (#4622)
-
v5.2.1 Changes
๐ Features
- (a62efc6) feat(locators): Add support for regex in cssContainingText (#4532)
๐ Fixes
- (e51f0ec) fix(doc): update doc for testing with node 8 async/await and chrome inspector. (#4613)
- (b204a83) doc(browser-support) improved Firefox documentation (#4553)
- (8d71a1b) docs(page-objects.md): Refactor the existing Page Object example (#4576)
- (95dd3ca) doc(tutorial): added example for element.getAttribute('value') to read text from an input (#4566)
Dependencies
- (bb63ab0) Update to the latest blocking proxy (#4546)
๐ฅ Breaking Changes
- (5d13b00) fix(jasmine): Update Jasmine to support Node8 async/await (#4608)
Breaking change for TypeScript: JasmineWD doesn't know anything about async/await, turns off JasmineWD if control flow was disabled.
It will affect TypeScript tests that are using async/await and
a. miss some await keyword in the test.(Previously, this might cause the test failed silently and be reported as pass), or
b. use Promise in jasmine expect function
Before
ts await expect(getPromise()).toEqual(42);
Afterts expect(await getPromise()).toEqual(42);
-
v5.2.0 Changes
๐ Fixes
(f7e17f3) fix(clientSideScripts): change protractor to support waiting for hybrid app (#4512)
(4b7cada) fix(sauce): bring back sauceProxy as a configuration option (#4419)
(b87159b) fix(website): fix all locator examples to use
element
overbrowser.findElement
(#4413)(768fd39) fix(local): allow local driver provider to use gecko driver from config (#4412)
(c0b8770) docs(website): fix issue 4246
(f79938e) docs(plugins): add ng-apimock plugin to plugins.md
(ab1afb0) fix(blockingproxy): Start bpRunner strictly after setupDriverEnv
(b85e7ee) fix(npmignore): .map files in built directory cause stacktrace lines to nowhere Fixes #4371
(299fc8d) docs(browser-support): Fixed incorrect example
(e5a5d59) docs(frameworks) align cucumberOpts comments
(fe8c480) docs(frameworks) update cucumber dry run option
(2e9acf5) docs(plugins) add protractor-numerator plugin to plugins.md
(3f861ae) By.js locator should accept functions
Dependencies
- (0fbc2c0) chore(release): update selenium-webdriverjs
-
v5.1.2 Changes
๐ Features
- (dd2ccbb) feat(saucelabs): Add Sauce Labs protocol customization support
New option
sauceSeleniumUseHttp
available inprotractor.conf.js
If true, uses 'http' instead of 'https' to connect to Sauce Labs defined bysauceSeleniumAddress
๐ Fixes
(1a47076) fix(ci): Use latest pip on CircleCI
(fd59c78) fix(elementexplorer): Set script breakpoints with cross-platform safe paths.
Fixes #4011
- (1250278) fix(cli): Correctly parse list chromeOptions
Chromedriver requires that certain options always be passed as an array. Optimist passes --single-option as a string instead of an array which is invalid. This ensures that we always pass an array, even if a single option is passed via the cli.
Fixes #4050
- (183cd80) fix(browser): Fix browser.angularAppRoot()
By default, it wasn't returning anything. Now it returns a promise that resolves to internalAngularAppRoot. Fixes #4233
- (bd534fb) fix: Add "stackTrace" option to allowedNames in cli.ts
This fixes a problem I encountered similar to #4196 - where
stackTrace
is listed as an option but an error is given saying it's an "unknown extra flag"(8249167) fix: export Runner, not just its type. (#4227)
(0eb5b76) fix(navigation): ignore unknown JS errors in IE (#4149)
The
err
object doesn't have thecode
property any more (Selenium Server Standalone 3.3.1 + IEDriver win32 3.3.0), so we need a new way to detect those errors. See #841- (4752ad1) chore(examples): Fix TSC issues with exampleTypescript (#4132)
Dependencies
- (a0a1fac) chore(deps): Updating webdriver-manager and jasminewd2
-
v5.1.1 Changes
๐ Features
(3edd62e) feat(saucelabs): Add Sauce Labs HTTPS Support (#4071)
(29f975a) feat(plugins): allow plugins to know which browser instance to run against (#4066)
Closes https://github.com/angular/protractor/issues/4054
Dependencies
(9d69a81) deps(typescript): use typescript@~2.0.0 (#4062)
- move noCF tests to install and fix reference to protractor
- changed element.ts to not use keyof
- remove gulp task tsc:spec
๐ฅ Breaking Changes
- The protocol for a Sauce Labs selenium relay (sauceSeleniumAddress in protractor.conf.js) is 'https' (previously used 'http'). The protocol is not configurable in this version.
-
v5.1.0 Changes
Blocking proxy
Blocking Proxy is a new experimental feature in Protractor 5 and is behind the ๐
--useBlockingProxy
orblockingProxyUrl
. See the lib/config.ts#L100. Other ways to start blocking proxy include using the ๐--highlightDelay
and--webDriverLogDir
flags See lib/config.ts#L501.This adds two options, both of which are implemented with Blocking ๐ฒ Proxy.
--webDriverLogDir
will create a readable log with timing information of webdriver commands in the specified directory.--highlightDelay
will pause before clicking on elements or sending keys. While paused, the element that's about to be affected will be highlighted.Webdriver-manager
โ Webdriver-manager will now by default grab the latest versions of all binaries (standalone, chromedriver, iedriver, gecko driver). Use the ๐
--versions.(binary name)
to pin to a specific version. Selenium standalone 3.0.1 has a bug which prevents it from working with any version of FireFox. โ We have tested version 3.0.0-beta4 and know that it works with ๐ FireFox 51, and we expect that the 3.0.2 release will also work.๐ TypeScript support
For jasmine users, in order to get all the type declarations that are used in jasminewd2, you'll need to install
@types/jasminewd2
in addition to@types/jasmine
as dev dependencies.๐ Features
- (0cd156d) feat(debugging): Add webdriver logging and highlight delay. (#4039)
This adds two options, both of which are implemented with Blocking Proxy. --webDriverLogDir will create a readable log with timing information of webdriver commands in the specified directory.
--highlightDelay will pause before clicking on elements or sending keys. While paused, the element that's about to be affected will be highlighted.
- (3d98a16)
feat(config): Support setting
SELENIUM_PROMISE_MANAGER
flag via the config (#4023)
Closes https://github.com/angular/protractor/issues/3691
- (4e40fb1)
feat(browser): chain promises in
browser.get
(#4017)
Closes https://github.com/angular/protractor/issues/3904
- (33393ca)
feat(browser): chain some promises in
lib/browser.ts
+ return promise fromwaitForAngularEnabled
(#4021)
Minor breaking change since
waitForAngularEnabled
no longer returns a boolean Part of angular#3904 Chainingbrowser.get
has proved surprisingly complex, so I'll do that in a different PR Also fixed a minor bug inlib/clientsidescripts.js
while debuging- (7cb9739)
feat(browser.ready): make
browser.ready
wait for all async setup work (#4015)
Closes https://github.com/angular/protractor/issues/3900
- (b77cb92)
feat(restart):
browser.restart
should return a promise (#4008)
Also allows
browser.restart
to work when the control flow is disabled, and fixes it for forked browsers.Closes #3899 and #3896 https://github.com/angular/protractor/issues/3896
- (4a59412) feat(angularAppRoot): Replace rootEl with browser.angularAppRoot() (#3996)
Replace browser.rootEl with browser.angularAppRoot(), which changes the root element in a promise on the control flow. Note that browser.rootEl will immediately return the current value, but browser.angularAppRoot() will return a promise that resolves during the next step in the control flow.
Also update to BlockingProxy 0.0.3, which allows changing rootSelector.
(879aac6) chore(blockingproxy): Allow using a pre-existing Blocking Proxy instance (#3970)
(bf123ad) feat(elements): Add isPresent() to ElementArrayFinder. (#3974)
๐ Bug Fixes
- (f9bee84) fix(restart): preserve waitForAngularEnabled on restart and add promise chaining
I noticed I missed
waitForAngularEnabled
in #4037. This commit fixed that.While I was at it I fixed a minor error where the promises implicitly created by setting
rootEl
andignoreSynchronization
weren't getting chained properly.Also fixed minor (so minor I think it was impossible to trigger) where browser.plugins_ could be undefined.
(0b0c224) fix(plugins): do not force ManagedPromise in plugins.ts (#4036)
(9c2274d) fix(restart): preserve properties like
browser.baseUrl
upon restart (#4037)
I also fixed a minor issue where
internalRootEl
wasn't being set when blocking proxy was being used. I also just cleaned up our internal uses ofthis.rootEl
.Closes #4032
- (a20c7a7) fix(element chaining): make element chaining work when the control flow is disabled (#4029)
Also added some tests to
spec/ts/noCF/smoke_spec.ts
double checking that the control flow is off(7481dee) fix(cli): Make unknown flag check a warning instead of an error. (#4028)
(40bbeca) fix(expectedConditions): Add tests and fix race conditions around visibility (#4006)
Add test cases to reproduce the missing element race conditions possible in expected condition methods
visibilityOf
,textToBePresentInElement
,textToBePresentInValue
andelementToBeClickable
.Add error handler
falseIfMissing
to all expected conditions that depend on the presence of an element.Expected conditions check the presence of an element before other checks, but when an element is removed exactly in the moment after the
isPresent
and beforeisDisplayed
invisibilityOf
the condition used to fail.This solution does not handle missing elements in (
isEnable
,isDisplayed
,isSelected
) and focused only on expected conditions (see #3972)This problem was also referenced in #3578 and #3777
- (5856037) fix(cli): Allow frameworks to specify flags they recognize. (#3994)
Fix for #3978. Our initial plan to allow setting --disableChecks with an environment variable is insufficient, since the custom framework isn't even require()'d until after the config is parsed. This moves the unknown flag check into the runner, and gives frameworks a way to specify extra flags they accept.
(e68dcf1) fix(driverProviders): Check config in the right place. (#3991)
(eb89920) fix(driverProviders): Handle promise rejection when starting selenium (#3989)
Fixes #3986. Also error if jvmArgs isn't an array.
(8d2fc07) chore(browser): deprecate
browser.getLocationAbsUrl()
. (#3969)Closes #3185
(15a1872) fix(firefox): Fix directConnect for Firefox 51+ (#3953)
(81f56a4) fix(cli): display disableChecks option in extra flags error message (#3964)
(6a4dc7a) fix: no longer use es6 let statement (#3963)
- Currently in Protractor v5 the Angular detection script uses ES6 features like the
let
modifier.
- Currently in Protractor v5 the Angular detection script uses ES6 features like the
This can break Protractor on browsers, which doesn't support those statements.
See https://saucelabs.com/beta/tests/275f75091dac40a0a3374d29d912caee/commands#11
- (528338c) fix(expectedCondition): fix NoSuchElementError in visibilityOf due to a race condition (#3777)
Handle NoSuchElementError in the expected condition visibilityOf, which occurred when an element disappears between the isPresent() and isDisplayed() check.
Dependencies
- (5899b67) deps(update): update webdriver-manager to 12.0.1 (#4042)
Running
webdriver-manager update
will now by default grab the latest versions of all binaries (standalone, chromedriver, iedriver, gecko driver). You can continue to pin to a specific versions using the command line option. Examplewebdriver-manager update --versions.chrome 2.20
. As of this release the latest versions are:- gecko v0.14.0
- selenium-standalone 3.0.1 is the latest jar file; however, we recommend 3.0.0-beta4. See note below on Firefox support.
- chromedriver 2.27
- iedriver 3.0.0
A note on FireFox support: Selenium standalone 3.0.1 has a bug which prevents it from working with any version of FireFox. We have tested version 3.0.0-beta4 and know that it works with FireFox 51, and we expect that the 3.0.2 release will also work.
closes #4033
- (cd084a0) deps(jasmine): update jasmine to 2.5.3 (#3960)
-
v5.0.0 Changes
โฌ๏ธ This version includes big changes around upgrading to selenium-webdriver 3.0.x. ๐ See the selenium-webdriver changelog.
๐ For the 5.0.0 release, we are still using the selenium standalone server 2.53.1 ๐ and recommend using Firefox 47. Firefox 48+ currently is not supported.
๐ฅ Breaking Changes
- Minimum node version is now 6.9.x.
- โ
When testing with Firefox 47, use the capability option
marionette: false
to use the legacy Firefox driver.
Before:
capabilities: { browserName: 'firefox' }
After:
capabilities: { browserName: 'firefox', marionette: false }
- ๐ We moved
@types/jasmine
to a devDependency. This means that Jasmine TypeScript users will need to include the@types/jasmine
as a project dependency. This is to avoid conflicts for users that prefer mocha typings.
After:
"dependencies": { "@types/jasmine": "^2.5.38" }
- ๐ Selenium-webdriver methods removed:
WebDriver.prototype.isElementPresent
,WebElement.prototype.getRawId
,WebElement.prototype.getInnerHtml
, andWebElement.prototype.getOuterHtml
.
Before:
let isPresent = browser.driver.isElementPresent(By.tagName('a')); let i = element(locator).getInnerHtml(); let o = element(locator).getOuterHtml();
After:
let isPresent = element(By.tagName('a')).isPresent(); let i = browser.executeScript("return arguments[0].innerHTML;", element(locator)); let o = browser.executeScript("return arguments[0].outerHTML;", element(locator));
- ๐ Selenium-webdriver
ErrorCodes
have been removed. - โ Adding cookies have been changed:
Before:
browser.manage().addCookie('testcookie', 'Jane-1234');
After:
browser.manage().addCookie({name:'testcookie', value: 'Jane-1234'});
- โ Removed
protractor.wrapDriver()
. - ๐ป You can no longer use
repl
command from withinbrowser.pause()
. Instead, usebrowser.explore()
to directly enter therepl
. - Sending flags that are not recognized by the CLI throws an error. Since flags
are a subset of all configuration options, these errors can be silenced with
--disableChecks
. - Auto-detection of the root element. This is a breaking change because it
changes the default root element behavior and removes the
config.useAllAngular2AppRoots
flag. Modern angular apps now default to using all app hooks, and ng1 apps now check several places, notably the element the app bootstraps to. - ๐ง
sauceProxy
configuration field has been removed. UsewebDriverProxy
instead.
Before:
sauceProxy: 'http://sauceProxy'
After:
webDriverProxy: 'http://sauceProxy'
๐ Features
- (ec93c4a) chore(cli): breaking change throw errors on unknown flags (#3921)
Unknown flags are options sent that is unrecognized by the CLI. For users that encounter this error but would like to silence it, use:
--disableChecks
.closes #3216
- (bc58332) feat(rootEl): breaking change auto-detect the root element better (#3928)
This is a breaking change because it changes the default root element behavior and removes the
config.useAllAngular2AppRoots
flag. Modern angular apps now default to using all app hooks, and ng1 apps now check several places, notably the element the app bootstraps to.closes #1742
- (604fdbf) cleanup(config): breaking change Remove redundant sauceProxy config (#3868)
Removes the
sauceProxy
config field, and useswebDriverProxy
when creating the SauceLabs client.- (9465b9f) feat(mobile): add extended wd commands for appium (#3860)
Also had to make some minor changes to the website to handle longer inheritance chains Closes https://github.com/angular/protractor/issues/1940
- (0e26b21) feat(blockingproxy): Add synchronization with BlockingProxy. (#3813)
This adds support for BlockingProxy behind the flag --useBlockingProxy.
If set, the driver providers will start a proxy during their setup phase, passing the selenium address to the proxy and starting a webdriver client that talks to the proxy.
Starting a proxy for each driver provider isn't strictly necessary. However, when we run with multiple capabilities it's easier to handle the logging if each Protractor instance has it's own proxy.
Known issues:
- Doesn't work with directConnect. You can get the address of chromedriver by mucking around in Selenium internals, but this probably changed for Selenium 3.0 and I doubt it's worth figuring out until we upgrade.
Doesn't yet work with webDriverProxy (but it's an easy fix)
- (ca4f1ac) chore(driverProviders): add warnings to extra driver provider parameters (#3873)
builds the driver provider in lib/driverProviders/index instead of lib/runner closes #1945
- (681b54a) refactor(browser): Remove protractor.wrapDriver() breaking change (#3827)
Before:
Users could create their own selenium driver instance and enable Protractor on it like so:
let capabilities = webdriver.Capabilities.chrome(); let driver = new webdriver.Builder().usingServer(seleniumAddress) .withCapabilities(capabilities).build(); let browser = protractor.wrapDriver(driver);
Over the years, wrapDriver() has become increasingly broken as Protractor needs extra configuration options that wrapDriver() doesn't set.
After:
This method is removed. If users need a new browser instance, they can use
browser.forkNewDriverInstance()
.- (86fd569) feat(ngUpgrade): Auto detect ngUpgrade apps and make the ng12Hybrid flag unnecessary for most users (#3847)
๐ Bug fixes
- (de153e7) fix(launcher): running getMultiCapabilities should reject on errors (#3876)
closes #3875
- (1345137)
fix(isElementPresent): for un-wrapped
WebElement
s,browser.isElementPresent
was broken (#3871)
Closes #3864
- (4af3b2e) fix(element): Fix typing of ElementFinder.then (#3835)
Type
then
as optional on ElementFinder.Dependencies
(4d87c9c) deps(update): update tslint and @types/selenium-webdriver (#3941)
- use @types/selenium-webdriver ~2.53.39
- fix for tslint
closes #3939
- (7376708) deps(tslint): set tslint to ~4.2 (#3938)
- (cb38ed0) Refactor element explorer to work with selenium-webdriver 3 (#3828)
This implementation now relies mostly on promises explicitly, so the control flow is only used to add one large task to the queue. This should pave the way for the eventual removal of the control flow, as well as getting element explorer to work immediately.
BREAKING CHANGE
You can no longer use the
repl
command from withinbrowser.pause()
. Instead, usebrowser.explore()
to directly enter the repl.- (8196059)
chore(dependency): switch to webdriver-manager 11.1.0 and remove
--versions.chrome 2.26
from circle.yml (#3865) (397bf65) deps(update): move @types/jasmine to devDependencies (#3795)
- update outdated dependencies
- move @types/jasmine to devDependencies closes #3792
(a3e8b43) deps(selenium-webdriver): upgrade to selenium 3 (#3781)
Please see the selenium-webdriver changelog
- Removed method `WebDriver.prototype.isElementPresent` - Removed method `WebElement.prototype.getRawId` - Removed `getInnerHtml` and `getOutterHtml` - Dependency required for upgrade: use `[email protected]`. - Selenium-webdriver requires node version 6+, updating travis and circle yml to use node 6 and 7. - Use `instanceof` selenium-webdriver error instead of error code. Selenium-webdriver error codes have been deprecated. - Use executor with selenium-webdriver from `lib/http`. Deferred executor has been deprecated. - Fix quitting `driverProviders`. When calling `webdriver.quit`, the control flow is shutdown and will throw an error. - Driver provider for direct connect has been modified to use `ServiceBuilder` and to call the `Service` to `createSession` - Note: Since this upgrade is still using FF 47, direct connect for Firefox is required to pass "marionette: false" in the capabilities. If you do not pass marionette to false, it will look for gecko driver in the PATH. - Added a TODO to support FF after 48+ with direct connect and gecko driver. - Updated `browser.manage().addCookie('testcookie', 'Jane-1234');` to use `browser.manage().addCookie({name:'testcookie', value: 'Jane-1234'});` - Updated debug commons for breakpoint updated to selenium-webdriver `lib/http` line 432. - For mocha tests, `selenium-webdriver/testing` uses the global `it` and cannot be reassigned as Protractor's global `it`. Some code has been copied / modified to `lib/frameworks/mocha` to make this work. - Capabilities for Firefox 47 requires setting marionette to false. - Setup still requires selenium standalone server 2.53.1 for Firefox tests. Firefox version used is 47. - Using selenium standalone server 3, with Firefox 48+ tests fail with gecko driver still do not work. - Selenium standalone 3 + FF 49 + gecko driver 0.11.1 does not work - Selenium standalone 3 + FF 48 + gecko driver 0.11.1 appears to work for a single test but after it quits, selenium standalone no longer works with firefox. When firefox 48 exists, logs show the following: ``` 20:01:14.814 INFO - Executing: [delete session: e353fa1b-e266-4ec3-afb3-88f11a82473a]) [GFX1-]: Receive IPC close with reason=AbnormalShutdown [Child 30665] ###!!! ABORT: Aborting on channel error.: file /builds/slave/m-rel-m64-00000000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2052 [Child 30665] ###!!! ABORT: Aborting on channel error.: file /builds/slave/m-rel-m64-00000000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2052 ```
- (eb31c9c) deps(types): update @types/selenium-webdriver dependency (#3886)
Fixes issue #3879 and adds the protractor.Key.chord method
-
v4.0.14 Changes
๐ Bug Fixes
(83694f5) fix(types): update for selenium-webdriver types creating transpile errors (#3848)
- pin package.json to a specific version of @types/selenium-webdriver
(ea09be4) fix(jasmine): Return the full test name in Jasmine test results. (#3842)
Fixes #3510
(76cb4b4) fix(element): Fix typing of then function (#3785)
(5a12d69) fix(config): cucumberOpts.require should be an optional Array of strings (#3817)
- Both cucumber options require and format now support
string
orstring[]
see #3822 #3817 - Remove no longer available options and fix
dryRun
type - Update comment for
dryRun
- Both cucumber options require and format now support
๐ Features
- (b337a8e) feat(config): add seleniumServerStartTimeout (#3791)
Dependencies