|
| 1 | +# 5.0.0 |
| 2 | + |
| 3 | +This version includes big changes around upgrading to selenium-webdriver 3.0.x. |
| 4 | +See the [selenium-webdriver changelog](https://github.com/SeleniumHQ/selenium/blob/master/javascript/node/selenium-webdriver/CHANGES.md). |
| 5 | + |
| 6 | +For the 5.0.0 release, we are still using the selenium standalone server 2.53.1 |
| 7 | +and recommend using Firefox 47. Firefox 48+ currently is not supported. |
| 8 | + |
| 9 | +## Breaking Changes |
| 10 | + |
| 11 | +- Minimum node version is now 6.9.x. |
| 12 | +- When testing with Firefox 47, use the capability option `marionette: false` |
| 13 | + to use the legacy Firefox driver. |
| 14 | + |
| 15 | + Before: |
| 16 | + ``` |
| 17 | + capabilities: { |
| 18 | + browserName: 'firefox' |
| 19 | + } |
| 20 | + ``` |
| 21 | + |
| 22 | + After: |
| 23 | + ``` |
| 24 | + capabilities: { |
| 25 | + browserName: 'firefox', |
| 26 | + marionette: false |
| 27 | + } |
| 28 | + ``` |
| 29 | + |
| 30 | +- We moved `@types/jasmine` to a devDependency. This means that Jasmine |
| 31 | + TypeScript users will need to include the `@types/jasmine` as a project |
| 32 | + dependency. This is to avoid conflicts for users that prefer mocha typings. |
| 33 | + |
| 34 | + After: |
| 35 | + ``` |
| 36 | + "dependencies": { |
| 37 | + "@types/jasmine": "^2.5.38" |
| 38 | + } |
| 39 | + ``` |
| 40 | + |
| 41 | +- Selenium-webdriver methods removed: `WebDriver.prototype.isElementPresent`, |
| 42 | + `WebElement.prototype.getRawId`, `WebElement.prototype.getInnerHtml`, and |
| 43 | + `WebElement.prototype.getOuterHtml`. |
| 44 | + |
| 45 | + Before: |
| 46 | + ``` |
| 47 | + let isPresent = browser.driver.isElementPresent(By.tagName('a')); |
| 48 | + let i = element(locator).getInnerHtml(); |
| 49 | + let o = element(locator).getOuterHtml(); |
| 50 | + ``` |
| 51 | + |
| 52 | + After: |
| 53 | + ``` |
| 54 | + let isPresent = element(By.tagName('a')).isPresent(); |
| 55 | + let i = browser.executeScript("return arguments[0].innerHTML;", element(locator)); |
| 56 | + let o = browser.executeScript("return arguments[0].outerHTML;", element(locator)); |
| 57 | + ``` |
| 58 | + |
| 59 | +- Selenium-webdriver `ErrorCodes` have been removed. |
| 60 | +- Adding cookies have been changed: |
| 61 | + |
| 62 | + Before: |
| 63 | + ``` |
| 64 | + browser.manage().addCookie('testcookie', 'Jane-1234'); |
| 65 | + ``` |
| 66 | + |
| 67 | + After: |
| 68 | + ``` |
| 69 | + browser.manage().addCookie({name:'testcookie', value: 'Jane-1234'}); |
| 70 | + ``` |
| 71 | +- Removed `protractor.wrapDriver()`. |
| 72 | +- You can no longer use `repl` command from within `browser.pause()`. Instead, |
| 73 | + use `browser.explore()` to directly enter the `repl`. |
| 74 | +- Sending flags that are not recognized by the CLI throws an error. Since flags |
| 75 | + are a subset of all configuration options, these errors can be silenced with |
| 76 | + `--disableChecks`. |
| 77 | +- Auto-detection of the root element. This is a breaking change because it |
| 78 | + changes the default root element behavior and removes the |
| 79 | + `config.useAllAngular2AppRoots` flag. Modern angular apps now |
| 80 | + default to using all app hooks, and ng1 apps now check several places, notably |
| 81 | + the element the app bootstraps to. |
| 82 | +- `sauceProxy` configuration field has been removed. Use `webDriverProxy` |
| 83 | + instead. |
| 84 | + |
| 85 | + Before: |
| 86 | + ``` |
| 87 | + sauceProxy: 'http://sauceProxy' |
| 88 | + ``` |
| 89 | + |
| 90 | + After: |
| 91 | + ``` |
| 92 | + webDriverProxy: 'http://sauceProxy' |
| 93 | + ``` |
| 94 | + |
| 95 | +## Features |
| 96 | + |
| 97 | +- ([ec93c4a](https://github.com/angular/protractor/commit/ec93c4ab882991410ad9d3f52d87c0f5ec947641)) |
| 98 | + chore(cli): **breaking change** throw errors on unknown flags (#3921) |
| 99 | + |
| 100 | + Unknown flags are options sent that is unrecognized by the CLI. For users that |
| 101 | + encounter this error but would like to silence it, use: `--disableChecks`. |
| 102 | + |
| 103 | + closes #3216 |
| 104 | +- ([bc58332](https://github.com/angular/protractor/commit/bc583321a233453fc2b89472013b2ec3e1d6b6f9)) |
| 105 | + feat(rootEl): ***breaking change*** auto-detect the root element better (#3928) |
| 106 | + |
| 107 | + This is a breaking change because it changes the default root element behavior |
| 108 | + and removes the `config.useAllAngular2AppRoots` flag. Modern angular apps now |
| 109 | + default to using all app hooks, and ng1 apps now check several places, notably |
| 110 | + the element the app bootstraps to. |
| 111 | + |
| 112 | + closes #1742 |
| 113 | +- ([604fdbf](https://github.com/angular/protractor/commit/604fdbf064cc2785a2e745747beeaeb45d27f8ed)) |
| 114 | + cleanup(config): **breaking change** Remove redundant sauceProxy config (#3868) |
| 115 | + |
| 116 | + Removes the `sauceProxy` config field, and uses `webDriverProxy` when creating |
| 117 | + the SauceLabs client. |
| 118 | +- ([9465b9f](https://github.com/angular/protractor/commit/9465b9f1e667c9590e05d9ddac16fe5143aa93af)) |
| 119 | + feat(mobile): add extended wd commands for appium (#3860) |
| 120 | + |
| 121 | + Also had to make some minor changes to the website to handle longer inheritance |
| 122 | + chains |
| 123 | + Closes https://github.com/angular/protractor/issues/1940 |
| 124 | +- ([0e26b21](https://github.com/angular/protractor/commit/0e26b218d5f385dd9871a40553acc174cfdfe26d)) |
| 125 | + feat(blockingproxy): Add synchronization with BlockingProxy. (#3813) |
| 126 | + |
| 127 | + This adds support for BlockingProxy behind the flag --useBlockingProxy. |
| 128 | + |
| 129 | + If set, the driver providers will start a proxy during their setup phase, |
| 130 | + passing the selenium address to the proxy and starting a webdriver client |
| 131 | + that talks to the proxy. |
| 132 | + |
| 133 | + Starting a proxy for each driver provider isn't strictly necessary. However, |
| 134 | + when we run with multiple capabilities it's easier to handle the logging if |
| 135 | + each Protractor instance has it's own proxy. |
| 136 | + |
| 137 | + Known issues: |
| 138 | + |
| 139 | + - Doesn't work with directConnect. You can get the address of chromedriver by |
| 140 | + mucking around in Selenium internals, but this probably changed for Selenium |
| 141 | + 3.0 and I doubt it's worth figuring out until we upgrade. |
| 142 | + - Doesn't yet work with webDriverProxy (but it's an easy fix) |
| 143 | + |
| 144 | +- ([ca4f1ac](https://github.com/angular/protractor/commit/ca4f1acda3672942307d0f102d586c8889dd3d68)) |
| 145 | + chore(driverProviders): add warnings to extra driver provider parameters (#3873) |
| 146 | + |
| 147 | + - builds the driver provider in lib/driverProviders/index instead of lib/runner |
| 148 | + closes #1945 |
| 149 | + |
| 150 | +- ([681b54a](https://github.com/angular/protractor/commit/681b54a21ee1467d5a95c3693cde148759767d62)) |
| 151 | + refactor(browser): Remove protractor.wrapDriver() **breaking change** (#3827) |
| 152 | + |
| 153 | + Before: |
| 154 | + |
| 155 | + Users could create their own selenium driver instance and enable Protractor on |
| 156 | + it like so: |
| 157 | + |
| 158 | + ```js |
| 159 | + let capabilities = webdriver.Capabilities.chrome(); |
| 160 | + let driver = new webdriver.Builder().usingServer(seleniumAddress) |
| 161 | + .withCapabilities(capabilities).build(); |
| 162 | + let browser = protractor.wrapDriver(driver); |
| 163 | + ``` |
| 164 | + |
| 165 | + Over the years, wrapDriver() has become increasingly broken as Protractor |
| 166 | + needs extra configuration options that wrapDriver() doesn't set. |
| 167 | + |
| 168 | + After: |
| 169 | + |
| 170 | + This method is removed. If users need a new browser instance, they can |
| 171 | + use `browser.forkNewDriverInstance()`. |
| 172 | + |
| 173 | +- ([86fd569](https://github.com/angular/protractor/commit/86fd56917f039efbff8e6f323f4d91fa8bc821a4)) |
| 174 | + feat(ngUpgrade): Auto detect ngUpgrade apps and make the ng12Hybrid flag |
| 175 | + unnecessary for most users (#3847) |
| 176 | + |
| 177 | + |
| 178 | +## Bug fixes |
| 179 | + |
| 180 | +- ([de153e7](https://github.com/angular/protractor/commit/de153e769292f6b9a99b2d5152bd2929ab1c48af)) |
| 181 | + fix(launcher): running getMultiCapabilities should reject on errors (#3876) |
| 182 | + |
| 183 | + closes #3875 |
| 184 | +- ([1345137](https://github.com/angular/protractor/commit/1345137dc5173e868de4b9da6ed16b7928e4c50e)) |
| 185 | + fix(isElementPresent): for un-wrapped `WebElement`s, `browser.isElementPresent` |
| 186 | + was broken (#3871) |
| 187 | + |
| 188 | + Closes #3864 |
| 189 | +- ([4af3b2e](https://github.com/angular/protractor/commit/4af3b2e30e925ea9d8e47537ea0a7fe8f04b579d)) |
| 190 | + fix(element): Fix typing of ElementFinder.then (#3835) |
| 191 | + |
| 192 | + Type `then` as optional on ElementFinder. |
| 193 | + |
| 194 | + |
| 195 | +## Dependencies |
| 196 | +- ([4d87c9c](https://github.com/angular/protractor/commit/4d87c9c20d6905189c0e7ea7214cf3e87c8efe91)) |
| 197 | + deps(update): update tslint and @types/selenium-webdriver (#3941) |
| 198 | + |
| 199 | + - use @types/selenium-webdriver ~2.53.39 |
| 200 | + - fix for tslint |
| 201 | + |
| 202 | + closes #3939 |
| 203 | +- ([7376708](https://github.com/angular/protractor/commit/7376708c723976ef8a0a3ad7c245606bef1221db)) |
| 204 | + deps(tslint): set tslint to ~4.2 (#3938) |
| 205 | +- ([cb38ed0](https://github.com/angular/protractor/commit/cb38ed0a8aae2cb862001e0b6f076aa9972f4489)) |
| 206 | + Refactor element explorer to work with selenium-webdriver 3 (#3828) |
| 207 | + |
| 208 | + This implementation now relies mostly on promises explicitly, so the control |
| 209 | + flow is only used to add one large task to the queue. This should pave the way |
| 210 | + for the eventual removal of the control flow, as well as getting element |
| 211 | + explorer to work immediately. |
| 212 | + |
| 213 | + BREAKING CHANGE |
| 214 | + |
| 215 | + You can no longer use the `repl` command from within `browser.pause()`. Instead, |
| 216 | + use `browser.explore()` to directly enter the repl. |
| 217 | +- ([8196059](https://github.com/angular/protractor/commit/819605933d2dfef70b4332a727b3b3830e306817)) |
| 218 | + chore(dependency): switch to webdriver-manager 11.1.0 and remove |
| 219 | + `--versions.chrome 2.26` from circle.yml (#3865) |
| 220 | +- ([397bf65](https://github.com/angular/protractor/commit/397bf65e088b640cf3612f9da678180f49939b84)) |
| 221 | + deps(update): move @types/jasmine to devDependencies (#3795) |
| 222 | + |
| 223 | + - update outdated dependencies |
| 224 | + - move @types/jasmine to devDependencies |
| 225 | + closes #3792 |
| 226 | +- ([a3e8b43](https://github.com/angular/protractor/commit/a3e8b4319d3e8b049e55e5c3c64a7fdb5a132ddf)) |
| 227 | + deps(selenium-webdriver): upgrade to selenium 3 (#3781) |
| 228 | + |
| 229 | + Please see the [selenium-webdriver changelog](https://github.com/SeleniumHQ/selenium/blob/master/javascript/node/selenium-webdriver/CHANGES.md) |
| 230 | + |
| 231 | + - Removed method `WebDriver.prototype.isElementPresent` |
| 232 | + - Removed method `WebElement.prototype.getRawId` |
| 233 | + - Removed `getInnerHtml` and `getOutterHtml` |
| 234 | + |
| 235 | + - Dependency required for upgrade: use `[email protected]`. |
| 236 | + - Selenium-webdriver requires node version 6+, updating travis and circle yml |
| 237 | + to use node 6 and 7. |
| 238 | + |
| 239 | + - Use `instanceof` selenium-webdriver error instead of error code. |
| 240 | + Selenium-webdriver error codes have been deprecated. |
| 241 | + |
| 242 | + - Use executor with selenium-webdriver from `lib/http`. Deferred executor has |
| 243 | + been deprecated. |
| 244 | + - Fix quitting `driverProviders`. When calling `webdriver.quit`, the control |
| 245 | + flow is shutdown and will throw an error. |
| 246 | + - Driver provider for direct connect has been modified to use `ServiceBuilder` |
| 247 | + and to call the `Service` to `createSession` |
| 248 | + - Note: Since this upgrade is still using FF 47, direct connect for Firefox is |
| 249 | + required to pass "marionette: false" in the capabilities. If you do not pass |
| 250 | + marionette to false, it will look for gecko driver in the PATH. |
| 251 | + - Added a TODO to support FF after 48+ with direct connect and gecko driver. |
| 252 | + |
| 253 | + - Updated `browser.manage().addCookie('testcookie', 'Jane-1234');` to use |
| 254 | + `browser.manage().addCookie({name:'testcookie', value: 'Jane-1234'});` |
| 255 | + |
| 256 | + - Updated debug commons for breakpoint updated to selenium-webdriver |
| 257 | + `lib/http` line 432. |
| 258 | + |
| 259 | + - For mocha tests, `selenium-webdriver/testing` uses the global `it` and |
| 260 | + cannot be reassigned as Protractor's global `it`. Some code has been |
| 261 | + copied / modified to `lib/frameworks/mocha` to make this work. |
| 262 | + |
| 263 | + - Capabilities for Firefox 47 requires setting marionette to false. |
| 264 | + - Setup still requires selenium standalone server 2.53.1 for Firefox tests. |
| 265 | + Firefox version used is 47. |
| 266 | + - Using selenium standalone server 3, with Firefox 48+ tests fail with gecko |
| 267 | + driver still do not work. |
| 268 | + - Selenium standalone 3 + FF 49 + gecko driver 0.11.1 does not work |
| 269 | + - Selenium standalone 3 + FF 48 + gecko driver 0.11.1 appears to work for a |
| 270 | + single test but after it quits, selenium standalone no longer works with |
| 271 | + firefox. When firefox 48 exists, logs show the following: |
| 272 | + |
| 273 | + ``` |
| 274 | + 20:01:14.814 INFO - Executing: [delete session: e353fa1b-e266-4ec3-afb3-88f11a82473a]) |
| 275 | + [GFX1-]: Receive IPC close with reason=AbnormalShutdown |
| 276 | + [Child 30665] ###!!! ABORT: Aborting on channel error.: file /builds/slave/m-rel-m64-00000000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2052 |
| 277 | + [Child 30665] ###!!! ABORT: Aborting on channel error.: file /builds/slave/m-rel-m64-00000000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2052 |
| 278 | + ``` |
| 279 | +- ([eb31c9c](https://github.com/angular/protractor/commit/eb31c9c7755399bcd01630158d900e0b940e9c31)) |
| 280 | + deps(types): update @types/selenium-webdriver dependency (#3886) |
| 281 | +
|
| 282 | + Fixes issue #3879 and adds the protractor.Key.chord method |
| 283 | +
|
1 | 284 | # 4.0.14
|
2 | 285 |
|
3 | 286 | ## Bug Fixes
|
|
0 commit comments