Skip to content

Initial move to docusuarus #236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: versions/2.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 19 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
node_modules
.idea
*.plist
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
21 changes: 0 additions & 21 deletions LICENSE.md

This file was deleted.

50 changes: 35 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,41 @@
# Nightwatch v2.0 Documentation
# Website

Documentation sources for [nightwatchjs.org](http://nightwatchjs.org) website.
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

[![npm](https://img.shields.io/npm/v/nightwatch.svg)](https://www.npmjs.com/package/nightwatch)
[![Node.js CI](https://github.com/nightwatchjs/nightwatch/actions/workflows/build-node.yaml/badge.svg?branch=main)](https://github.com/nightwatchjs/nightwatch/actions/workflows/build-node.yaml)
[![codecov](https://codecov.io/gh/nightwatchjs/nightwatch/branch/main/graph/badge.svg?token=MSObyfECEh)](https://codecov.io/gh/nightwatchjs/nightwatch)
[![npm package](https://img.shields.io/npm/dm/nightwatch.svg)](https://www.npmjs.com/package/nightwatch)
[![Discord][discord-badge]][discord]
[![Twitter Follow](https://img.shields.io/twitter/follow/nightwatchjs.svg?style=social)](https://twitter.com/nightwatchjs)
### Installation

<p align="center">
<img alt="Nightwatch.js Schematic Logo" src="https://raw.githubusercontent.com/nightwatchjs/nightwatch/f214d79b3f7d0cf7602a6b57823420baaa3b5282/.github/assets/nightwatch-logo.svg" width=300 />
</p>
```
$ yarn
```

#### [Homepage](https://nightwatchjs.org) &bullet; [Getting Started](https://nightwatchjs.org/gettingstarted) &bullet; [Developer Guide](https://nightwatchjs.org/guide) &bullet; [API Reference](https://nightwatchjs.org/api) &bullet; [About](https://nightwatchjs.org/about)
### Local Development

***
```
$ yarn start
```

[discord-badge]: https://img.shields.io/discord/618399631038218240.svg?color=7389D8&labelColor=6A7EC2&logo=discord&logoColor=ffffff&style=flat-square
[discord]: https://discord.gg/SN8Da2X
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
53 changes: 33 additions & 20 deletions blog/a-first-look-at-nightwatch-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ author: Andrei Rusu
author_title: Author and maintainer of Nightwatch
author_url: https://github.com/beatfactor
author_image_url: https://avatars.githubusercontent.com/u/419506?v=4
tags: [nightwatch-v2]
tags:
- nightwatch-v2
description: A new chapter for Nightwatch.js awaits.
draft: false
date: 2021-06-23
Expand Down Expand Up @@ -37,59 +38,71 @@ Which brings me to the most exciting part of this article I believe. Work is alr
We are completely reworking the transport layer to use the official [Selenium Webdriver][6] bindings for Node.js, which means more seamless browser integration, better and more reliable DOM element handling, and overall more stable and faster tests. Nightwatch v1.x will still be supported and we’ll issue regular patch updates for critical issues. We’ll also try to make the upgrade from Nightwatch v1.5 or higher to v2 as smooth as possible and we’ll try to not introduce any major breaking changes.

Here’s some of the new features in v2 which you might find attractive:

##### • Support for Actions API

The [Actions api][7] provides a more reliable method for generating complex user gestures and will be a built-in feature in Nightwatch (via the existing `.perform()` command).

##### • Expanded automatic command retries

In the current version, Nightwatch only supports retrying failed element retrieval operations, but in v2 it will also retry failed element commands (such as when click encounters errors like `element click intercepted`).

##### • New relative element locators

The new Selenium 4 [relative locators][8] will be available by default in Nightwatch as well as improved existing locators via the Selenium [By()][9] api.

##### • Built-in support for working with file uploads

Currently uploading files with Nightwatch can be cumbersome, but in v2 we’ll add a built-in command which works with the [FileDetector api][10].

##### • Support for extended Capabilities objects

The primary way of defining capabilities will still be as part of the `nightwatch.conf.js` config file, but in v2, all capabilities objects created with the Selenium [Capabilities][11] api will be also be supported by default.

##### • Setting network conditions in Chrome

Manipulating network conditions is a regularly needed feature when working with browser automation and we’ll be able to support it in v2 for Chrome and Edge initially.

##### • Support for working with Devtools Protocol

The [Chrome DevTools Protocol][12] allows for tools to instrument, inspect, debug and profile Chromium-based browsers, such as Chrome and Edge, and we’ll add this capability in Nightwatch v2.

##### • Ready for Webdriver BiDi

The new [BiDirectional WebDriver Protocol][13] is by far one of the most exciting recent developments in the Selenium project and it likely to deliver improvements in speed and stability that far outweigh expectations. As soon as it is available, it will become part of Nightwatch as well. You can follow the development on the [Selenium website][14].

##### • Various new command APIs

Nightwatch v2 will also bring a new `.ensure` assert api which will mirror the [Selenium until][15] apis, global `element()`, `expect()`, `by()`, and `browser` objects which will enhance the experience of writing tests and provide more flexibility.

##### • Test runner improvements

Nightwatch v2 will also bring some improvements to the test runner, like ability to re-run only failed tests and improved support for parallel test execution.

The list above is not exhaustive and it might change until the initial public release of version 2. You can also review the updates published in [Nightwatch v1.7][16] in case you may have missed anything.

### Tell Us Your Opinion

We are also considering other new features, APIs, and integration with other tools like Appium or Playwright. It would be very helpful if you’d take the time to fill in [this short survey][17] and tell us about features you are using or would like to see in the new version. Please do share it with your team.

Thanks for reading. Please make sure to [star the project][18] on Github and also to follow us on Twitter; we're at [@nightwatchjs][19].

[1]: https://selenium.dev
[2]: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol
[3]: https://www.w3.org/TR/webdriver/
[4]: https://nightcloud.io
[5]: https://pineview.io
[6]: https://www.npmjs.com/package/selenium-webdriver
[7]: https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/lib/input_exports_Actions.html
[8]: https://www.selenium.dev/documentation/en/webdriver/locating_elements/#relative-locators
[9]: https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/index_exports_By.html
[10]: https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/lib/input_exports_FileDetector.html
[11]: https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/index_exports_Capabilities.html
[12]: https://chromedevtools.github.io/devtools-protocol/
[13]: https://w3c.github.io/webdriver-bidi/
[14]: https://www.selenium.dev/documentation/en/webdriver/bidi_apis/
[15]: https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/lib/until.html
[16]: https://github.com/nightwatchjs/nightwatch/releases/tag/v1.7.3
[17]: https://forms.gle/ahi2bTk7Kz4og8VK9
[18]: https://github.com/nightwatchjs/nightwatch
[19]: https://twitter.com/nightwatchjs
[1]: https://selenium.dev
[2]: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol
[3]: https://www.w3.org/TR/webdriver/
[4]: https://nightcloud.io
[5]: https://pineview.io
[6]: https://www.npmjs.com/package/selenium-webdriver
[7]: https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/lib/input_exports_Actions.html
[8]: https://www.selenium.dev/documentation/en/webdriver/locating_elements/#relative-locators
[9]: https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/index_exports_By.html
[10]: https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/lib/input_exports_FileDetector.html
[11]: https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/index_exports_Capabilities.html
[12]: https://chromedevtools.github.io/devtools-protocol/
[13]: https://w3c.github.io/webdriver-bidi/
[14]: https://www.selenium.dev/documentation/en/webdriver/bidi_apis/
[15]: https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/lib/until.html
[16]: https://github.com/nightwatchjs/nightwatch/releases/tag/v1.7.3
[17]: https://forms.gle/ahi2bTk7Kz4og8VK9
[18]: https://github.com/nightwatchjs/nightwatch
[19]: https://twitter.com/nightwatchjs
File renamed without changes.
1 change: 0 additions & 1 deletion blog/nightwatch-has-joined-the-browserstack-family.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ author: Andrei Rusu
author_title: Author and maintainer of Nightwatch
author_url: https://github.com/beatfactor
author_image_url: https://avatars.githubusercontent.com/u/419506?v=4
tags:
description: Automated end-to-end testing can help you to dramatically reduce your feedback loops in your development process.
draft: false
date: 2021-07-30
Expand Down
34 changes: 20 additions & 14 deletions blog/nightwatch-user-survey-results-2021.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ author: Abhishek Choudhary
author_title: Product @ Browserstack
author_url: https://github.com/abhishekchoudhary
author_image_url: https://avatars.githubusercontent.com/u/2182972?v=4
tags: [nightwatch-v2]
tags:
- nightwatch-v2
description: We are excited to share the results from the first-ever user survey we did for Nightwatch.
draft: false
date: 2021-11-09
Expand All @@ -13,50 +14,55 @@ link_to_discussions: https://github.com/nightwatchjs/nightwatch-docs/discussions
---

<div class="top-post-card">
<img src="/img/blog/image-20211108-112356.png">
<img src="/img/blog/image-20211108-112356.png"/>
</div>

A few months ago when [we announced](https://nightwatchjs.org/blog/a-first-look-at-nightwatch-v2.html) that we’re working on Nightwatch v2, we also sent out a short survey to help us gather more feedback from the community about the kind of features we should build.
A few months ago when [we announced](https://nightwatchjs.org/blog/a-first-look-at-nightwatch-v2.html) that we’re working on Nightwatch v2, we also sent out a short survey to help us gather more feedback from the community about the kind of features we should build.

Now that the v2 is [available in beta](https://nightwatchjs.org/blog/nightwatch-v2-beta-is-available.html) we are also excited to share the results from the first-ever user survey we did for Nightwatch.

## Key asks
We had 262 responses and the aks from the survey can be broadly classified into three sections:

We had 262 responses and the aks from the survey can be broadly classified into three sections:

#### 1. Test setup

There were quite a few inputs on the way users would like to set their tests up with Nightwatch:

- 67% responders believe Nightwatch should download drivers for popular browsers automatically
- 67% responders want to run tests in headless mode
- 67% responders believe Nightwatch should download drivers for popular browsers automatically
- 67% responders want to run tests in headless mode

#### 2. Infrastructure

Interestingly, there were varied responses about the kind of infrastructure our community wants to work with:

- 73% responders want to run tests against mobile browsers
- 57% responders want to use Nightwatch in conjunction with a Cloud provider (we have built-in Browserstack integration since v1.5, while configuration for other providers like SauceLabs is a straightforward)
- 73% responders want to run tests against mobile browsers
- 57% responders want to use Nightwatch in conjunction with a Cloud provider (we have built-in Browserstack integration since v1.5, while configuration for other providers like SauceLabs is a straightforward)

#### 3. Browser communication

Nearly 90% responders wanted more information out (and more control in general) of the browser when running tests. For example:

- 82% responders want to listen for JS exceptions
- 83% responders want to listen for console messages
- 80% responders want to intercept network calls or mock requests
- 82% responders want to listen for JS exceptions
- 83% responders want to listen for console messages
- 80% responders want to intercept network calls or mock requests

## Other notable asks

#### 1. Better integration with Cucumber JS

Good news - Nightwatch 2.0-beta includes built-in support for CucumberJS; have a look at the [examples](https://github.com/nightwatchjs/nightwatch/tree/v2/examples/cucumber-js) and you can use our new [CucumberJS boilerplate repo](https://github.com/nightwatchjs/cucumberjs-boilerplate) to get you started right away.

#### 2. Test runner enhancements

From a live UI runner to easier setup and integration - we heard you, watch this space.

#### 3. Improvements to documentation and community engagement

It’s at the top of our priorities and you should expect steady progress.

## In Conclusion

We asked users to rate us out of 10, and the average of all results was 7.7 - we’re glad to see such positive sentiment in the community. However, we want to take this number much higher and we have some exciting updates planned to achieve this.

Furthermore, we plan to do these surveys annually going forward and keep on improving Nightwatch based on the feedback we receive. We will also continue to share insights from these surveys with you.
Furthermore, we plan to do these surveys annually going forward and keep on improving Nightwatch based on the feedback we receive. We will also continue to share insights from these surveys with you.
Loading